2017-03-01 19:09:48 -05:00
|
|
|
package com.github.steveice10.packetlib.test;
|
2013-11-29 17:34:06 -05:00
|
|
|
|
2017-03-01 19:09:48 -05:00
|
|
|
import com.github.steveice10.packetlib.io.NetInput;
|
|
|
|
import com.github.steveice10.packetlib.io.NetOutput;
|
|
|
|
import com.github.steveice10.packetlib.packet.Packet;
|
2013-11-29 17:34:06 -05:00
|
|
|
|
2014-03-01 19:47:03 -05:00
|
|
|
import java.io.IOException;
|
2013-11-29 17:34:06 -05:00
|
|
|
|
|
|
|
public class PingPacket implements Packet {
|
2015-07-20 14:02:42 -04:00
|
|
|
private String id;
|
|
|
|
|
|
|
|
@SuppressWarnings("unused")
|
|
|
|
private PingPacket() {
|
|
|
|
}
|
|
|
|
|
|
|
|
public PingPacket(String id) {
|
|
|
|
this.id = id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getPingId() {
|
|
|
|
return this.id;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void read(NetInput in) throws IOException {
|
|
|
|
this.id = in.readString();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void write(NetOutput out) throws IOException {
|
|
|
|
out.writeString(this.id);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean isPriority() {
|
|
|
|
return false;
|
|
|
|
}
|
2013-11-29 17:34:06 -05:00
|
|
|
}
|