From 414192b8eedbe6fc068b8cf60ff31023f0862413 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 14 Sep 2013 10:16:46 +1000 Subject: [PATCH] Update Inventory and Health for PlayerConsumeItemEvent --- ...-and-Health-for-PlayerConsumeItemEve.patch | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 CraftBukkit-Patches/0069-Update-Inventory-and-Health-for-PlayerConsumeItemEve.patch diff --git a/CraftBukkit-Patches/0069-Update-Inventory-and-Health-for-PlayerConsumeItemEve.patch b/CraftBukkit-Patches/0069-Update-Inventory-and-Health-for-PlayerConsumeItemEve.patch new file mode 100644 index 0000000000..b319183e8a --- /dev/null +++ b/CraftBukkit-Patches/0069-Update-Inventory-and-Health-for-PlayerConsumeItemEve.patch @@ -0,0 +1,24 @@ +From 24b94662ec7f7cc5a9f7d953494ecfbbdb391035 Mon Sep 17 00:00:00 2001 +From: md_5 +Date: Sat, 14 Sep 2013 10:16:38 +1000 +Subject: [PATCH] Update Inventory and Health for PlayerConsumeItemEvent + + +diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java +index 0a35df8..e3c4d8c 100644 +--- a/src/main/java/net/minecraft/server/EntityHuman.java ++++ b/src/main/java/net/minecraft/server/EntityHuman.java +@@ -258,6 +258,10 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen + // Update client + if (this instanceof EntityPlayer) { + ((EntityPlayer) this).playerConnection.sendPacket(new Packet103SetSlot((byte) 0, activeContainer.a((IInventory) this.inventory, this.inventory.itemInHandIndex).index, this.f)); ++ // Spigot Start ++ ((EntityPlayer) this).getBukkitEntity().updateInventory(); ++ ((EntityPlayer) this).getBukkitEntity().updateScaledHealth(); ++ // Spigot End + } + return; + } +-- +1.8.1.2 +