summaryrefslogtreecommitdiffstats
path: root/nms-patches/ItemStack.patch
diff options
context:
space:
mode:
authorThinkofdeath <thinkofdeath@spigotmc.org>2016-03-01 21:37:08 +0000
committerThinkofdeath <thinkofdeath@spigotmc.org>2016-03-01 21:37:08 +0000
commit1be3bd058faf4fc0f2a351e92a99786e53f770b9 (patch)
tree7cf59d52b00b57e97bbdc68ebe947ce9ef9e3c95 /nms-patches/ItemStack.patch
parent4ca1f899071572fbd5d89fe52aeaeec1e474e920 (diff)
downloadcraftbukkit-1be3bd058faf4fc0f2a351e92a99786e53f770b9.tar
craftbukkit-1be3bd058faf4fc0f2a351e92a99786e53f770b9.tar.gz
craftbukkit-1be3bd058faf4fc0f2a351e92a99786e53f770b9.tar.lz
craftbukkit-1be3bd058faf4fc0f2a351e92a99786e53f770b9.tar.xz
craftbukkit-1be3bd058faf4fc0f2a351e92a99786e53f770b9.zip
SPIGOT-1607: Fix BlockPlaceEvent and BlockMultiPlaceEvent sometimes showing the wrong item used
Diffstat (limited to 'nms-patches/ItemStack.patch')
-rw-r--r--nms-patches/ItemStack.patch4
1 files changed, 2 insertions, 2 deletions
diff --git a/nms-patches/ItemStack.patch b/nms-patches/ItemStack.patch
index 58546163..b271b49b 100644
--- a/nms-patches/ItemStack.patch
+++ b/nms-patches/ItemStack.patch
@@ -97,9 +97,9 @@
+ List<BlockState> blocks = (List<BlockState>) world.capturedBlockStates.clone();
+ world.capturedBlockStates.clear();
+ if (blocks.size() > 1) {
-+ placeEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callBlockMultiPlaceEvent(world, entityhuman, blocks, blockposition.getX(), blockposition.getY(), blockposition.getZ());
++ placeEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callBlockMultiPlaceEvent(world, entityhuman, enumhand, blocks, blockposition.getX(), blockposition.getY(), blockposition.getZ());
+ } else if (blocks.size() == 1) {
-+ placeEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPlaceEvent(world, entityhuman, blocks.get(0), blockposition.getX(), blockposition.getY(), blockposition.getZ());
++ placeEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPlaceEvent(world, entityhuman, enumhand, blocks.get(0), blockposition.getX(), blockposition.getY(), blockposition.getZ());
+ }
+
+ if (placeEvent != null && (placeEvent.isCancelled() || !placeEvent.canBuild())) {