Class CustomBlockDataEvent
java.lang.Object
org.bukkit.event.Event
com.jeff_media.customblockdata.events.CustomBlockDataEvent
- All Implemented Interfaces:
Cancellable
- Direct Known Subclasses:
CustomBlockDataMoveEvent
,CustomBlockDataRemoveEvent
Represents an event that removes, changes or moves CustomBlockData due to regular Bukkit Events.
This event gets called during the underlying Bukkit Event's MONITOR listening phase. If the Bukkit Event
was already cancelled, this event will not be called.
If this event is cancelled, CustomBlockData will not be removed, changed or moved.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Represents the reason for a change of CustomBlockDataNested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Constructor Summary
ModifierConstructorDescriptionprotected
CustomBlockDataEvent
(Plugin plugin, Block block, Event bukkitEvent) -
Method Summary
Modifier and TypeMethodDescriptiongetBlock()
Gets the block involved in this event.Gets the underlying Bukkit Event that has caused this event to be called.Gets the CustomBlockData involved in this event.static HandlerList
Gets the reason for this change of CustomBlockDataboolean
Gets the cancellation status of this event.void
setCancelled
(boolean cancel) Sets the cancellation status of this event.Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
CustomBlockDataEvent
-
-
Method Details
-
getBlock
Gets the block involved in this event. -
getBukkitEvent
Gets the underlying Bukkit Event that has caused this event to be called. The Bukkit Event is currently listened on in MONITOR priority. -
getCustomBlockData
Gets the CustomBlockData involved in this event. -
isCancelled
public boolean isCancelled()Gets the cancellation status of this event.- Specified by:
isCancelled
in interfaceCancellable
-
setCancelled
public void setCancelled(boolean cancel) Sets the cancellation status of this event. If the event is cancelled, the CustomBlockData will not be removed, changed or moved.- Specified by:
setCancelled
in interfaceCancellable
-
getReason
Gets the reason for this change of CustomBlockData -
getHandlerList
-
getHandlers
- Specified by:
getHandlers
in classEvent
-