Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 20:40:07 +01:00
b3f265d1b1
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: 0ca45a21 #503: Add PlayerHarvestBlockEvent dfa80a52 SPIGOT-5930: Add PlayerRespawnEvent#isAnchorSpawn CraftBukkit Changes:145921e2
#676: Add PlayerHarvestBlockEvent47abffa2
SPIGOT-5929: Angered zombified piglins do not inherit killed_by_player status7f6b4f58
SPIGOT-5930: Add PlayerRespawnEvent#isAnchorSpawn94eff632
SPIGOT-5867, MC-193339: NPE during shutdown when rcon enabled with no password068618eb
SPIGOT-5927: Some items NBT data disappears Spigot Changes: beb7d47c Rebuild patches Fixes #3738
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 37f6fdf1be6d0f8a4ec4b9998fa710876b5515c9..36afa821dc5f04d77b6f44fe7282444ec6a7b842 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
|
@@ -330,13 +330,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;
|