PaperMC/Spigot-API-Patches/0192-add-hand-to-BlockMultiPlaceEvent.patch
Aikar e4d10a6d67
Updated Upstream (Bukkit/CraftBukkit)
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:
122289ff Add FaceAttachable interface to handle Grindstone facing in common with Switches
a6db750e SPIGOT-5647: ZombieVillager entity should have getVillagerType()

CraftBukkit Changes:
bbe3d58e SPIGOT-5650: Lectern.setPage(int) causes a NullPointerException
3075579f Add FaceAttachable interface to handle Grindstone facing in common with Switches
95bd4238 SPIGOT-5647: ZombieVillager entity should have getVillagerType()
4d975ac3 SPIGOT-5617: setBlockData does not work when NotPlayEvent is called by redstone current
2020-04-02 17:09:17 -04:00

32 lines
1.5 KiB
Diff

From 4491e720453f87bffe6259822f7e23b07d708cb4 Mon Sep 17 00:00:00 2001
From: Trigary <trigary0@gmail.com>
Date: Sun, 1 Mar 2020 22:43:34 +0100
Subject: [PATCH] add hand to BlockMultiPlaceEvent
diff --git a/src/main/java/org/bukkit/event/block/BlockMultiPlaceEvent.java b/src/main/java/org/bukkit/event/block/BlockMultiPlaceEvent.java
index fe2ec79dd..8460aa4f5 100644
--- a/src/main/java/org/bukkit/event/block/BlockMultiPlaceEvent.java
+++ b/src/main/java/org/bukkit/event/block/BlockMultiPlaceEvent.java
@@ -18,9 +18,17 @@ import org.jetbrains.annotations.NotNull;
public class BlockMultiPlaceEvent extends BlockPlaceEvent {
private final List<BlockState> states;
+ @Deprecated // Paper
public BlockMultiPlaceEvent(@NotNull List<BlockState> states, @NotNull Block clicked, @NotNull ItemStack itemInHand, @NotNull Player thePlayer, boolean canBuild) {
- super(states.get(0).getBlock(), states.get(0), clicked, itemInHand, thePlayer, canBuild);
+ //Paper start - add hand to BlockMultiPlaceEvent
+ this(states, clicked, itemInHand, thePlayer, canBuild, org.bukkit.inventory.EquipmentSlot.HAND);
+ }
+
+
+ public BlockMultiPlaceEvent(@NotNull List<BlockState> states, @NotNull Block clicked, @NotNull ItemStack itemInHand, @NotNull Player thePlayer, boolean canBuild, @NotNull org.bukkit.inventory.EquipmentSlot hand) {
+ super(states.get(0).getBlock(), states.get(0), clicked, itemInHand, thePlayer, canBuild, hand);
this.states = ImmutableList.copyOf(states);
+ //Paper end
}
/**
--
2.25.1