Package redempt.redlib.blockdata.events
Class CustomBlockPlaceEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.block.BlockEvent
redempt.redlib.blockdata.events.CustomBlockPlaceEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class CustomBlockPlaceEvent
extends org.bukkit.event.block.BlockEvent
implements org.bukkit.event.Cancellable
Called when a CustomBlock is placed by a Player
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Field Summary
Fields inherited from class org.bukkit.event.block.BlockEvent
block
-
Constructor Summary
ConstructorDescriptionCustomBlockPlaceEvent
(org.bukkit.block.Block block, org.bukkit.inventory.ItemStack item, CustomBlockType<?> type, org.bukkit.entity.Player player) Constructs a new CustomBlockPlaceEvent -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.event.HandlerList
org.bukkit.event.HandlerList
org.bukkit.inventory.ItemStack
getItem()
org.bukkit.entity.Player
boolean
void
setCancelled
(boolean cancel) Methods inherited from class org.bukkit.event.block.BlockEvent
getBlock
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
CustomBlockPlaceEvent
public CustomBlockPlaceEvent(org.bukkit.block.Block block, org.bukkit.inventory.ItemStack item, CustomBlockType<?> type, org.bukkit.entity.Player player) Constructs a new CustomBlockPlaceEvent- Parameters:
block
- The block that was placeditem
- The item used to break the blocktype
- The type of CustomBlock that is being placedplayer
- The Player that placed the block
-
-
Method Details
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList() -
getPlayer
public org.bukkit.entity.Player getPlayer()- Returns:
- The Player that placed the CustomBlock
-
getItem
public org.bukkit.inventory.ItemStack getItem()- Returns:
- The item that was in the player's hand when this block was placed
-
getCustomBlockType
- Returns:
- The CustomBlockType that is being placed
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean cancel) - Specified by:
setCancelled
in interfaceorg.bukkit.event.Cancellable
-
getHandlers
public org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlers
in classorg.bukkit.event.Event
-