aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches-Unmapped/0412-add-hand-to-BlockMultiPlaceEvent.patch
diff options
context:
space:
mode:
authorKyle Wood <[email protected]>2021-04-24 17:01:33 -0500
committerKyle Wood <[email protected]>2021-04-25 18:37:43 -0500
commit3093b81fee3064603c368ab934eddf66ce304433 (patch)
treecb99f05b5f31de92c41af4cc40b4bef5f3cbf573 /Spigot-Server-Patches-Unmapped/0412-add-hand-to-BlockMultiPlaceEvent.patch
parent1af696a05d21cbdd7b5a7170f95598c013257588 (diff)
downloadPaper-3093b81fee3064603c368ab934eddf66ce304433.tar.gz
Paper-3093b81fee3064603c368ab934eddf66ce304433.zip
Move patches
Diffstat (limited to 'Spigot-Server-Patches-Unmapped/0412-add-hand-to-BlockMultiPlaceEvent.patch')
-rw-r--r--Spigot-Server-Patches-Unmapped/0412-add-hand-to-BlockMultiPlaceEvent.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/Spigot-Server-Patches-Unmapped/0412-add-hand-to-BlockMultiPlaceEvent.patch b/Spigot-Server-Patches-Unmapped/0412-add-hand-to-BlockMultiPlaceEvent.patch
new file mode 100644
index 0000000000..8d6a90aa7d
--- /dev/null
+++ b/Spigot-Server-Patches-Unmapped/0412-add-hand-to-BlockMultiPlaceEvent.patch
@@ -0,0 +1,30 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Trigary <[email protected]>
+Date: Sun, 1 Mar 2020 22:43:24 +0100
+Subject: [PATCH] add hand to BlockMultiPlaceEvent
+
+
+diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+index 0f8764f16b0719e9e370731dc02627e1a55e9708..b1db56faffebbf46ac871f5f77af0d47d7cf4a8f 100644
+--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
++++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+@@ -331,13 +331,18 @@ public class CraftEventFactory {
+ }
+
+ org.bukkit.inventory.ItemStack item;
++ //Paper start - add hand to BlockMultiPlaceEvent
++ EquipmentSlot equipmentSlot;
+ if (hand == EnumHand.MAIN_HAND) {
+ item = player.getInventory().getItemInMainHand();
++ equipmentSlot = EquipmentSlot.HAND;
+ } else {
+ item = player.getInventory().getItemInOffHand();
++ equipmentSlot = EquipmentSlot.OFF_HAND;
+ }
+
+- BlockMultiPlaceEvent event = new BlockMultiPlaceEvent(blockStates, blockClicked, item, player, canBuild);
++ BlockMultiPlaceEvent event = new BlockMultiPlaceEvent(blockStates, blockClicked, item, player, canBuild, equipmentSlot);
++ //Paper end
+ craftServer.getPluginManager().callEvent(event);
+
+ return event;