diff options
author | mbax <matt@phozop.net> | 2013-07-02 19:34:08 -0400 |
---|---|---|
committer | mbax <matt@phozop.net> | 2013-07-02 21:06:17 -0400 |
commit | 774cf2a2ca0c705a37dac2cf6f9ad7ae40875b0c (patch) | |
tree | d48f4d335001bccfa5318fc96dea0066f234e15f /src/main/java/net/minecraft | |
parent | a15096ae1c4e9037926662b0cff9aee613ad2b73 (diff) | |
download | craftbukkit-774cf2a2ca0c705a37dac2cf6f9ad7ae40875b0c.tar craftbukkit-774cf2a2ca0c705a37dac2cf6f9ad7ae40875b0c.tar.gz craftbukkit-774cf2a2ca0c705a37dac2cf6f9ad7ae40875b0c.tar.lz craftbukkit-774cf2a2ca0c705a37dac2cf6f9ad7ae40875b0c.tar.xz craftbukkit-774cf2a2ca0c705a37dac2cf6f9ad7ae40875b0c.zip |
Update client on cancelled leash. Fixes BUKKIT-4395
Diffstat (limited to 'src/main/java/net/minecraft')
-rw-r--r-- | src/main/java/net/minecraft/server/PlayerConnection.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java index f82d932d..f201933d 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 |