Package org.bukkit.event.entity
Class EntityResurrectEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
org.bukkit.event.entity.EntityResurrectEvent
- All Implemented Interfaces:
Cancellable
Called when an entity dies and may have the opportunity to be resurrected.
Will be called in a cancelled state if the entity does not have a totem
equipped.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result -
Field Summary
Fields inherited from class org.bukkit.event.entity.EntityEvent
entity -
Constructor Summary
ConstructorsConstructorDescriptionEntityResurrectEvent(@NotNull LivingEntity livingEntity) Deprecated, for removal: This API element is subject to removal in a future version.EntityResurrectEvent(@NotNull LivingEntity livingEntity, @Nullable EquipmentSlot hand) -
Method Summary
Modifier and TypeMethodDescriptionReturns the Entity involved in this eventgetHand()Get the hand in which the totem of undying was found, ornullif the entity did not have a totem of undying.static @NotNull HandlerListbooleanGets the cancellation state of this event.voidsetCancelled(boolean cancel) Sets the cancellation state of this event.Methods inherited from class org.bukkit.event.entity.EntityEvent
getEntityTypeMethods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
EntityResurrectEvent
@Internal public EntityResurrectEvent(@NotNull @NotNull LivingEntity livingEntity, @Nullable @Nullable EquipmentSlot hand) -
EntityResurrectEvent
@Internal @Deprecated(since="1.19.2", forRemoval=true) public EntityResurrectEvent(@NotNull @NotNull LivingEntity livingEntity) Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
getEntity
Description copied from class:EntityEventReturns the Entity involved in this event- Overrides:
getEntityin classEntityEvent- Returns:
- Entity who is involved in this event
-
getHand
Get the hand in which the totem of undying was found, ornullif the entity did not have a totem of undying.- Returns:
- the hand, or
null
-
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- Returns:
trueif this event is cancelled
-
setCancelled
public 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 interfaceCancellable- Parameters:
cancel-trueif you wish to cancel this event
-
getHandlers
- Specified by:
getHandlersin classEvent
-
getHandlerList
-