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
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresents the reason for a change of CustomBlockDataNested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCustomBlockDataEvent(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 HandlerListGets the reason for this change of CustomBlockDatabooleanGets the cancellation status of this event.voidsetCancelled(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:
isCancelledin 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:
setCancelledin interfaceCancellable
-
getReason
Gets the reason for this change of CustomBlockData -
getHandlerList
-
getHandlers
- Specified by:
getHandlersin classEvent
-