Package org.bukkit.event.entity
Class EnderDragonChangePhaseEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
org.bukkit.event.entity.EnderDragonChangePhaseEvent
- All Implemented Interfaces:
- Cancellable
Called when an EnderDragon switches controller phase.
- 
Nested Class SummaryNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFields inherited from class org.bukkit.event.entity.EntityEvententity
- 
Constructor SummaryConstructorsConstructorDescriptionEnderDragonChangePhaseEvent(@NotNull EnderDragon enderDragon, EnderDragon.Phase currentPhase, EnderDragon.Phase newPhase) 
- 
Method SummaryModifier and TypeMethodDescriptionGets the current phase that the dragon is in.Returns the Entity involved in this eventstatic @NotNull HandlerListGets the new phase that the dragon will switch to.booleanGets the cancellation state of this event.voidsetCancelled(boolean cancel) Sets the cancellation state of this event.voidsetNewPhase(EnderDragon.Phase newPhase) Sets the new phase for the ender dragon.Methods inherited from class org.bukkit.event.entity.EntityEventgetEntityTypeMethods inherited from class org.bukkit.event.EventcallEvent, getEventName, isAsynchronous
- 
Constructor Details- 
EnderDragonChangePhaseEventpublic EnderDragonChangePhaseEvent(@NotNull @NotNull EnderDragon enderDragon, @Nullable EnderDragon.Phase currentPhase, @NotNull EnderDragon.Phase newPhase) 
 
- 
- 
Method Details- 
getEntityDescription copied from class:EntityEventReturns the Entity involved in this event- Overrides:
- getEntityin class- EntityEvent
- Returns:
- Entity who is involved in this event
 
- 
getCurrentPhaseGets the current phase that the dragon is in. This method will return null when a dragon is first spawned and hasn't yet been assigned a phase.- Returns:
- the current dragon phase
 
- 
getNewPhaseGets the new phase that the dragon will switch to.- Returns:
- the new dragon phase
 
- 
setNewPhaseSets the new phase for the ender dragon.- Parameters:
- newPhase- the new dragon phase
 
- 
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
- Returns:
- true if this event is cancelled
 
- 
setCancelledpublic void setCancelled(boolean cancel) 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
- Parameters:
- cancel- true if you wish to cancel this event
 
- 
getHandlers- Specified by:
- getHandlersin class- Event
 
- 
getHandlerList
 
-