From 774cf2a2ca0c705a37dac2cf6f9ad7ae40875b0c Mon Sep 17 00:00:00 2001 From: mbax Date: Tue, 2 Jul 2013 19:34:08 -0400 Subject: [PATCH] Update client on cancelled leash. Fixes BUKKIT-4395 --- src/main/java/net/minecraft/server/PlayerConnection.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java index f82d932df4..f201933daf 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1106,6 +1106,10 @@ public class PlayerConnection extends Connection { this.server.getPluginManager().callEvent(event); if (event.isCancelled()) { + if (itemInHand != null && itemInHand.id == Item.LEASH.id && entity instanceof EntityInsentient) { + // Refresh the current leash state + this.sendPacket(new Packet39AttachEntity(1, entity, ((EntityInsentient) entity).bE())); + } return; } // CraftBukkit end