summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntityLiving.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/EntityLiving.patch')
-rw-r--r--nms-patches/EntityLiving.patch11
1 files changed, 10 insertions, 1 deletions
diff --git a/nms-patches/EntityLiving.patch b/nms-patches/EntityLiving.patch
index cd95acf5..33ec1365 100644
--- a/nms-patches/EntityLiving.patch
+++ b/nms-patches/EntityLiving.patch
@@ -344,12 +344,21 @@
+ event.setCancelled(itemstack == null);
+ this.world.getServer().getPluginManager().callEvent(event);
+
-+ if (itemstack != null && !event.isCancelled()) {
++ if (!event.isCancelled()) {
+ itemstack1.subtract(1);
+ // CraftBukkit end
if (this instanceof EntityPlayer) {
EntityPlayer entityplayer = (EntityPlayer) this;
+@@ -859,7 +1009,7 @@
+ this.world.broadcastEntityEffect(this, (byte) 35);
+ }
+
+- return itemstack != null;
++ return !event.isCancelled();
+ }
+ }
+
@@ -944,6 +1094,12 @@
boolean flag = this.lastDamageByPlayerTime > 0;