2014-04-19 01:15:23 +02:00
|
|
|
From 7eb7f425e6d81bd6b1bc30b4d9fbf4d1e87815ff Mon Sep 17 00:00:00 2001
|
2014-04-12 06:18:37 +02:00
|
|
|
From: md_5 <md_5@live.com.au>
|
|
|
|
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
|
2014-04-19 01:15:23 +02:00
|
|
|
index d091bcf..c3a0dc3 100644
|
2014-04-12 06:18:37 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
|
|
|
@@ -277,6 +277,10 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
|
|
|
// Update client
|
|
|
|
if (this instanceof EntityPlayer) {
|
|
|
|
((EntityPlayer) this).playerConnection.sendPacket(new PacketPlayOutSetSlot((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;
|
|
|
|
}
|
|
|
|
--
|
2014-04-19 01:15:23 +02:00
|
|
|
1.9.1
|
2014-04-12 06:18:37 +02:00
|
|
|
|