Added client-side ping response handling #96
@@ -99,6 +99,9 @@ public class Bot extends Thread {
|
|||||||
|
|
||||||
client.send(new ServerboundAcceptTeleportationPacket(p.getTeleportId()));
|
client.send(new ServerboundAcceptTeleportationPacket(p.getTeleportId()));
|
||||||
}
|
}
|
||||||
|
else if (packet instanceof ClientboundPingPacket) {
|
||||||
|
client.send(new ServerboundPongPacket(((ClientboundPingPacket) packet).getId()));
|
||||||
|
}
|
||||||
else if (packet instanceof ClientboundPlayerCombatKillPacket){
|
else if (packet instanceof ClientboundPlayerCombatKillPacket){
|
||||||
if (Main.autoRespawnDelay >= 0) {
|
if (Main.autoRespawnDelay >= 0) {
|
||||||
Log.info("Bot " + nickname + " died. Respawning in " + Main.autoRespawnDelay + " ms.");
|
Log.info("Bot " + nickname + " died. Respawning in " + Main.autoRespawnDelay + " ms.");
|
||||||
|
|||||||
Reference in new issue
Block a user