aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0321-add-hand-to-BlockMultiPlaceEvent.patch
diff options
context:
space:
mode:
authorSpottedleaf <[email protected]>2024-07-17 10:24:53 -0700
committerSpottedleaf <[email protected]>2024-07-17 10:28:32 -0700
commit00b949f1bbbf444e2b5e7b8de7c9b14fbd2133c6 (patch)
tree82639515bc5e9ae00c1e639e72137ed51e1ac688 /patches/server/0321-add-hand-to-BlockMultiPlaceEvent.patch
parent967f98aa81da851740aeb429778e46159fd188df (diff)
downloadPaper-00b949f1bbbf444e2b5e7b8de7c9b14fbd2133c6.tar.gz
Paper-00b949f1bbbf444e2b5e7b8de7c9b14fbd2133c6.zip
Remove Moonrise utils to MCUtils, remove duplicated/unused utils
Diffstat (limited to 'patches/server/0321-add-hand-to-BlockMultiPlaceEvent.patch')
-rw-r--r--patches/server/0321-add-hand-to-BlockMultiPlaceEvent.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/patches/server/0321-add-hand-to-BlockMultiPlaceEvent.patch b/patches/server/0321-add-hand-to-BlockMultiPlaceEvent.patch
new file mode 100644
index 0000000000..3247f38cb9
--- /dev/null
+++ b/patches/server/0321-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 e7ba5b503e821d18467c2300f780ef37f996b34d..f670ddd3633bf36b653bdf994f459e84e09bfbff 100644
+--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
++++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+@@ -403,13 +403,18 @@ public class CraftEventFactory {
+ }
+
+ org.bukkit.inventory.ItemStack item;
++ // Paper start - add hand to BlockMultiPlaceEvent
++ EquipmentSlot equipmentSlot;
+ if (hand == InteractionHand.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;