package packets.c2spackets;
import network.MCConnection;
import exceptions.UnrecoverableException;
import packets.PacketHandler;
import packets.s2cpackets.S0x00;
import world.WorldState;
/**
* Client Ping to server.
* Returns a PING(0) back.
*/
public class P0x00 extends PacketHandler{
public P0x00(WorldState state) {
super(state);
}
@Override
public void handle(MCConnection conn) throws UnrecoverableException {
if(conn.r.readInt() == 0) {
conn.send(new S0x00(0));
} else {
//PING REPLY!
System.out.println(" PING REPLY!");
}
}
}