Package io.papermc.paper.event.block
Class DragonEggFormEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.block.BlockEvent
org.bukkit.event.block.BlockGrowEvent
org.bukkit.event.block.BlockFormEvent
io.papermc.paper.event.block.DragonEggFormEvent
- All Implemented Interfaces:
Cancellable
Called when the
EnderDragon is defeated (killed) in a DragonBattle,
causing a Material.DRAGON_EGG (more formally: BlockGrowEvent.getNewState())
to possibly appear depending on isCancelled().
This event might be cancelled by default depending on
eg. DragonBattle.hasBeenPreviouslyKilled() and server configuration.-
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.BlockEvent
block -
Constructor Summary
ConstructorsConstructorDescriptionDragonEggFormEvent(@NotNull Block block, @NotNull BlockState newState, @NotNull DragonBattle dragonBattle) -
Method Summary
Modifier and TypeMethodDescriptionGets theDragonBattleassociated with this event.static @NotNull HandlerListbooleanGets the cancellation state of this event.voidsetCancelled(boolean cancelled) Sets the cancellation state of this event.Methods inherited from class org.bukkit.event.block.BlockGrowEvent
getNewStateMethods inherited from class org.bukkit.event.block.BlockEvent
getBlockMethods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
DragonEggFormEvent
public DragonEggFormEvent(@NotNull @NotNull Block block, @NotNull @NotNull BlockState newState, @NotNull @NotNull DragonBattle dragonBattle)
-
-
Method Details
-
isCancelled
public boolean isCancelled()Description copied from interface:CancellableGets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins- Specified by:
isCancelledin interfaceCancellable- Overrides:
isCancelledin classBlockGrowEvent- Returns:
- true if this event is cancelled
-
setCancelled
public void setCancelled(boolean cancelled) Description copied from interface:CancellableSets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.- Specified by:
setCancelledin interfaceCancellable- Overrides:
setCancelledin classBlockGrowEvent- Parameters:
cancelled- true if you wish to cancel this event
-
getDragonBattle
Gets theDragonBattleassociated with this event. Keep in mind that theEnderDragonis already dead when this event is called.- Returns:
- the dragon battle
-
getHandlers
- Overrides:
getHandlersin classBlockFormEvent
-
getHandlerList
-