Package dev.cwhead.GravesX.event
Class GravePostCreateEvent
java.lang.Object
org.bukkit.event.Event
dev.cwhead.GravesX.event.graveevent.GraveEvent
dev.cwhead.GravesX.event.graveevent.GraveEntityEvent
dev.cwhead.GravesX.event.GravePostCreateEvent
- All Implemented Interfaces:
Addon,org.bukkit.event.Cancellable
Represents an event that occurs after a grave creation attempt has completed.
This is a post event: it fires after GraveCreateEvent and after placement has been attempted.
It is primarily intended for addons/integrations that want to react to the outcome.
The placed location may be null if the grave was not placed (e.g. failed placement, void death
with safe-location disabled, or placement handled elsewhere).
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Field Summary
Fields inherited from class dev.cwhead.GravesX.event.graveevent.GraveEvent
block, blockType, grave, location -
Constructor Summary
ConstructorsConstructorDescriptionGravePostCreateEvent(@NotNull org.bukkit.entity.Entity entity, @NotNull Grave grave, @Nullable org.bukkit.Location placedLocation) Constructs a newGravePostCreateEvent. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull org.bukkit.event.HandlerList@NotNull org.bukkit.event.HandlerListGets the list of handlers for this event.@Nullable org.bukkit.LocationGets the final placement location.booleanisPlaced()Checks whether the grave was successfully placed.Methods inherited from class dev.cwhead.GravesX.event.graveevent.GraveEntityEvent
getEntity, getEntityCustomName, getEntityName, getEntityType, getEntityUniqueId, getLivingEntity, getLivingEntityKiller, getLivingEntityKillerName, getLivingEntityKillerType, getLivingEntityKillerUniqueId, getLivingEntityVictim, getLivingEntityVictimId, getLivingEntityVictimType, getPlayer, getTargetEntity, hasKiller, hasLivingEntity, hasPlayer, isEntityActuallyPlayerMethods inherited from class dev.cwhead.GravesX.event.graveevent.GraveEvent
getBlock, getBlockExp, getBlockType, getGrave, getGraveExperience, getGraveOwnerDisplayName, getGraveOwnerName, getGraveOwnerNameDisplay, getGraveOwnerTexture, getGraveOwnerTextureSignature, getGraveOwnerUniqueId, getGraveUUID, getLocation, hasBlock, hasBlockType, hasLocation, isAddon, isCancelled, isDropItems, setAddon, setBlockExp, setCancelled, setDropItems, setLocationMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
GravePostCreateEvent
public GravePostCreateEvent(@NotNull @NotNull org.bukkit.entity.Entity entity, @NotNull @NotNull Grave grave, @Nullable @Nullable org.bukkit.Location placedLocation) Constructs a newGravePostCreateEvent.- Parameters:
entity- The entity the grave belongs to.grave- The grave that was created for this death.placedLocation- The final placement location, ornullif not placed.
-
-
Method Details
-
getPlacedLocation
@Nullable public @Nullable org.bukkit.Location getPlacedLocation()Gets the final placement location.- Returns:
- The location the grave was placed at, or
nullif not placed.
-
isPlaced
public boolean isPlaced()Checks whether the grave was successfully placed.- Returns:
trueifgetPlacedLocation()is non-null.
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()Description copied from class:GraveEntityEventGets the list of handlers for this event.- Overrides:
getHandlersin classGraveEntityEvent- Returns:
- The handler list for this event.
-
getHandlerList
@NotNull public static @NotNull org.bukkit.event.HandlerList getHandlerList()
-