Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
ce2eae5ce3
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing
Bukkit Changes:
b56e8160 #519: Add ArrowBodyCountChangeEvent
CraftBukkit Changes:
39806409e
#697: Add ArrowBodyCountChangeEvent
31 Zeilen
1.4 KiB
Diff
31 Zeilen
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Trigary <trigary0@gmail.com>
|
|
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 460f473b0158f2392261a55db12fa735969de470..ded7ac09b161135885189e1fb71403ef4856ad30 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
|
@@ -336,13 +336,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;
|