org.bukkit.event.block
Class BlockMultiPlaceEvent

java.lang.Object
  extended by org.bukkit.event.Event
      extended by org.bukkit.event.block.BlockEvent
          extended by org.bukkit.event.block.BlockPlaceEvent
              extended by org.bukkit.event.block.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.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
 
Field Summary
 
Fields inherited from class org.bukkit.event.block.BlockPlaceEvent
canBuild, cancel, itemInHand, placedAgainst, player, replacedBlockState
 
Fields inherited from class org.bukkit.event.block.BlockEvent
block
 
Constructor Summary
BlockMultiPlaceEvent(List<BlockState> states, Block clicked, ItemStack itemInHand, Player thePlayer, boolean canBuild)
           
 
Method Summary
 List<BlockState> getReplacedBlockStates()
          Gets a list of blockstates for all blocks which were replaced by the placement of the new blocks.
 
Methods inherited from class org.bukkit.event.block.BlockPlaceEvent
canBuild, getBlockAgainst, getBlockPlaced, getBlockReplacedState, getHandlerList, getHandlers, getItemInHand, getPlayer, isCancelled, setBuild, setCancelled
 
Methods inherited from class org.bukkit.event.block.BlockEvent
getBlock
 
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlockMultiPlaceEvent

public BlockMultiPlaceEvent(List<BlockState> states,
                            Block clicked,
                            ItemStack itemInHand,
                            Player thePlayer,
                            boolean canBuild)
Method Detail

getReplacedBlockStates

public 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


Copyright © 2014. All rights reserved.