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 SummaryNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFields inherited from class org.bukkit.event.block.BlockEventblock
- 
Constructor SummaryConstructorsConstructorDescriptionDragonEggFormEvent(@NotNull Block block, @NotNull BlockState newState, @NotNull DragonBattle dragonBattle) 
- 
Method SummaryModifier 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.BlockGrowEventgetNewStateMethods inherited from class org.bukkit.event.block.BlockEventgetBlockMethods inherited from class org.bukkit.event.EventcallEvent, getEventName, isAsynchronous
- 
Constructor Details- 
DragonEggFormEventpublic DragonEggFormEvent(@NotNull @NotNull Block block, @NotNull @NotNull BlockState newState, @NotNull @NotNull DragonBattle dragonBattle) 
 
- 
- 
Method Details- 
isCancelledpublic 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 interface- Cancellable
- Overrides:
- isCancelledin class- BlockGrowEvent
- Returns:
- true if this event is cancelled
 
- 
setCancelledpublic 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 interface- Cancellable
- Overrides:
- setCancelledin class- BlockGrowEvent
- Parameters:
- cancelled- true if you wish to cancel this event
 
- 
getDragonBattleGets theDragonBattleassociated with this event. Keep in mind that theEnderDragonis already dead when this event is called.- Returns:
- the dragon battle
 
- 
getHandlers- Overrides:
- getHandlersin class- BlockFormEvent
 
- 
getHandlerList
 
-