41 lines
784 B
Java
41 lines
784 B
Java
package network.protocol.packets;
|
|
|
|
import java.time.Instant;
|
|
|
|
import network.protocol.Packet;
|
|
import network.protocol.PacketVisitor;
|
|
import network.protocol.Packets;
|
|
|
|
public class ChatMessagePacket extends Packet {
|
|
|
|
static private final long serialVersionUID = Packets.Login.ordinal();
|
|
|
|
private final Instant time;
|
|
private final String chatter;
|
|
private final String content;
|
|
|
|
public ChatMessagePacket(Instant time, String chatter, String content) {
|
|
this.time = time;
|
|
this.chatter = chatter;
|
|
this.content = content;
|
|
}
|
|
|
|
public Instant getTime() {
|
|
return time;
|
|
}
|
|
|
|
public String getChatter() {
|
|
return chatter;
|
|
}
|
|
|
|
public String getContent() {
|
|
return content;
|
|
}
|
|
|
|
@Override
|
|
public void accept(PacketVisitor packetVisitor) {
|
|
packetVisitor.visitPacket(this);
|
|
}
|
|
|
|
}
|