public class DragonEggFormEvent extends BlockFormEvent implements Cancellable
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.Event.Result
block
Constructor and Description |
---|
DragonEggFormEvent(@NotNull Block block,
@NotNull BlockState newState,
@NotNull DragonBattle dragonBattle) |
Modifier and Type | Method and Description |
---|---|
@NotNull DragonBattle |
getDragonBattle()
Gets the
DragonBattle associated with this event. |
static @NotNull HandlerList |
getHandlerList() |
@NotNull HandlerList |
getHandlers() |
boolean |
isCancelled()
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancelled)
Sets the cancellation state of this event.
|
getNewState
getBlock
callEvent, getEventName, isAsynchronous
public DragonEggFormEvent(@NotNull @NotNull Block block, @NotNull @NotNull BlockState newState, @NotNull @NotNull DragonBattle dragonBattle)
public boolean isCancelled()
Cancellable
isCancelled
in interface Cancellable
isCancelled
in class BlockGrowEvent
public void setCancelled(boolean cancelled)
Cancellable
setCancelled
in interface Cancellable
setCancelled
in class BlockGrowEvent
cancelled
- true if you wish to cancel this event@NotNull public @NotNull DragonBattle getDragonBattle()
DragonBattle
associated with this event.
Keep in mind that the EnderDragon
is already dead
when this event is called.@NotNull public @NotNull HandlerList getHandlers()
getHandlers
in class BlockFormEvent
@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2021. All rights reserved.