Update Bot.java
Added a ping response from the server
This commit is contained in:
1 parent
fb99076f88
commit
9d6f7a5598
1 file changed
+3
@@ -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