Class BlockMultiPlaceEvent

All Implemented Interfaces:
Cancellable

public class BlockMultiPlaceEvent extends BlockPlaceEvent
Fired when a single block placement action of a player triggers the creation of multiple blocks(e.g. placing a bed block). The block returned by BlockPlaceEvent.getBlockPlaced() and its related methods is the block where the placed block would exist if the placement only affected a single block.
  • Constructor Details

    • BlockMultiPlaceEvent

      @Internal @Deprecated(forRemoval=true) public BlockMultiPlaceEvent(@NotNull @NotNull List<BlockState> states, @NotNull @NotNull Block clicked, @NotNull @NotNull ItemStack itemInHand, @NotNull @NotNull Player thePlayer, boolean canBuild)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • BlockMultiPlaceEvent

      @Internal public BlockMultiPlaceEvent(@NotNull @NotNull List<BlockState> states, @NotNull @NotNull Block clicked, @NotNull @NotNull ItemStack itemInHand, @NotNull @NotNull Player thePlayer, boolean canBuild, @NotNull EquipmentSlot hand)
  • Method Details

    • getReplacedBlockStates

      @NotNull public @NotNull List<BlockState> getReplacedBlockStates()
      Gets a list of blockstates for all blocks which were replaced by the placement of the new blocks. Most of these blocks will just have a Material type of AIR.
      Returns:
      immutable list of replaced BlockStates