mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-26 12:36:07 +01:00
e2e09326d5
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:
3c844f35 #512: Expand Strider and Steerable entity API
CraftBukkit Changes:
32acc2621
#686: Expand Strider and Steerable entity API
31 lines
1.4 KiB
Diff
31 lines
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 1dd3c871316b246210ef05d93e949f363deb322f..a44fa04f312d812f5593df90ebf7fe1483f73376 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
|
@@ -318,13 +318,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;
|