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.Resultblock| 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.
|
getNewStategetBlockcallEvent, getEventName, isAsynchronouspublic DragonEggFormEvent(@NotNull @NotNull Block block, @NotNull @NotNull BlockState newState, @NotNull @NotNull DragonBattle dragonBattle)
public boolean isCancelled()
CancellableisCancelled in interface CancellableisCancelled in class BlockGrowEventpublic void setCancelled(boolean cancelled)
CancellablesetCancelled in interface CancellablesetCancelled in class BlockGrowEventcancelled - 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.