SPIGOT-2867: Update inventory on cancelled interacts too

This commit is contained in:
md_5 2016-11-30 15:33:29 +11:00
parent fffaf07113
commit 6d5a66f00f

View File

@ -224,7 +224,7 @@
return flag;
}
}
@@ -280,63 +419,85 @@
@@ -280,63 +419,86 @@
}
}
@ -280,6 +280,7 @@
+ } else if (blockdata.getBlock() instanceof BlockCake) {
+ ((EntityPlayer) entityhuman).getBukkitEntity().sendHealthUpdate(); // SPIGOT-1341 - reset health for cake
+ }
+ ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); // SPIGOT-2867
+ enuminteractionresult = (event.useItemInHand() != Event.Result.ALLOW) ? EnumInteractionResult.SUCCESS : EnumInteractionResult.PASS;
+ } else if (this.gamemode == EnumGamemode.SPECTATOR) {
+ TileEntity tileentity = world.getTileEntity(blockposition);