mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 23:10:16 +01:00
add hand to BlockMultiPlaceEvent
This commit is contained in:
parent
fbcf4759fb
commit
0ee773e88b
1 changed files with 9 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue