Class CustomBlockPlaceEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
dev.lone.itemsadder.api.Events.CustomBlockPlaceEvent
- All Implemented Interfaces:
Cancellable
Called when a player places an ItemsAdder custom block.
-
Nested Class Summary
Nested classes/interfaces inherited from class Event
Event.Result -
Method Summary
Modifier and TypeMethodDescriptiongetBlock()Gets the placed block.Gets the custom block item stack.static @NotNull HandlerList@NotNull HandlerListGets the item used to place the custom block.Gets the custom block namespaced id.Gets the block this block was placed against.Gets the block state replaced by this placement.booleanGets whether Bukkit allows building at this location.booleanvoidsetCancelled(boolean cancelled) Methods inherited from class PlayerEvent
getPlayerMethods inherited from class Event
callEvent, getEventName, isAsynchronous
-
Method Details
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceCancellable
-
setCancelled
public void setCancelled(boolean cancelled) - Specified by:
setCancelledin interfaceCancellable
-
getHandlers
- Specified by:
getHandlersin classEvent
-
getHandlerList
-
getCustomBlockItem
Gets the custom block item stack.- Returns:
- a Bukkit item stack copy of the custom block.
-
getNamespacedID
-
getBlock
-
isCanBuild
public boolean isCanBuild()Gets whether Bukkit allows building at this location.- Returns:
- true if building is allowed.
-
getPlacedAgainst
Gets the block this block was placed against.- Returns:
- the block placed against.
-
getReplacedBlockState
Gets the block state replaced by this placement.- Returns:
- the replaced block state.
-
getItemInHand
Gets the item used to place the custom block.- Returns:
- the item in hand.
-