3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-16 13:00:06 +01:00
Paper/CraftBukkit-Patches/0041-Update-Inventory-and-Health-for-PlayerConsumeItemEve.patch

25 Zeilen
1.1 KiB
Diff

2014-11-28 02:17:45 +01:00
From bccecea300f4b3dc11024365a81ce16978dd240e Mon Sep 17 00:00:00 2001
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-11-28 02:17:45 +01:00
index 6e9354f..0844b60 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
2014-11-28 02:17:45 +01:00
@@ -298,6 +298,10 @@ public abstract class EntityHuman extends EntityLiving {
// Update client
if (this instanceof EntityPlayer) {
2014-11-28 02:17:45 +01:00
((EntityPlayer) this).playerConnection.sendPacket(new PacketPlayOutSetSlot((byte) 0, activeContainer.getSlot((IInventory) this.inventory, this.inventory.itemInHandIndex).index, this.g));
+ // Spigot Start
+ ((EntityPlayer) this).getBukkitEntity().updateInventory();
+ ((EntityPlayer) this).getBukkitEntity().updateScaledHealth();
+ // Spigot End
}
return;
}
--
2014-11-28 02:17:45 +01:00
2.1.0