Class GravePlayerEvent
java.lang.Object
org.bukkit.event.Event
dev.cwhead.GravesX.event.graveevent.GraveEvent
dev.cwhead.GravesX.event.graveevent.GraveEntityEvent
dev.cwhead.GravesX.event.graveevent.GravePlayerEvent
- All Implemented Interfaces:
Addon
,org.bukkit.event.Cancellable
- Direct Known Subclasses:
GraveBreakEvent
,GraveCloseEvent
,GraveCompassAddEvent
,GraveCompassUseEvent
,GraveLootedEvent
,GraveOpenEvent
,GraveParticleEvent
public class GravePlayerEvent
extends GraveEntityEvent
implements org.bukkit.event.Cancellable, Addon
Player-based grave event.
This subclass provides accessors specific to Player
, including player identity
and any InventoryView
involved.
-
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
ConstructorsConstructorDescriptionGravePlayerEvent
(@NotNull Grave grave, @NotNull org.bukkit.entity.Player player, @Nullable org.bukkit.Location location, BlockData.BlockType blockType, @Nullable org.bukkit.block.Block block, @Nullable org.bukkit.inventory.InventoryView inventoryView, @Nullable org.bukkit.entity.LivingEntity livingEntity, @Nullable org.bukkit.entity.LivingEntity targetEntity) Constructs a newGravePlayerEvent
. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull org.bukkit.event.HandlerList
Gets the static list of handlers for this event.@NotNull org.bukkit.event.HandlerList
Gets the list of handlers for this event.@NotNull org.bukkit.inventory.InventoryView
Gets the inventory view associated with the event.@NotNull org.bukkit.entity.Player
Gets the player involved in the event.@NotNull String
Gets the player display name involved in the event.@NotNull String
Gets the player name involved in the event.@NotNull UUID
Gets the player unique ID involved in the event.boolean
Checks inventory view associated with the event.boolean
Checks the player involved in the event.boolean
Determines if entity in an event is Player or Entity.Methods inherited from class dev.cwhead.GravesX.event.graveevent.GraveEntityEvent
getEntity, getEntityCustomName, getEntityName, getEntityType, getEntityUniqueId, getLivingEntity, getLivingEntityKiller, getLivingEntityKillerName, getLivingEntityKillerType, getLivingEntityKillerUniqueId, getLivingEntityVictim, getLivingEntityVictimId, getLivingEntityVictimType, getTargetEntity, hasKiller, hasLivingEntity
Methods 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, setLocation
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.bukkit.event.Cancellable
isCancelled, setCancelled
-
Constructor Details
-
GravePlayerEvent
public GravePlayerEvent(@NotNull @NotNull Grave grave, @NotNull @NotNull org.bukkit.entity.Player player, @Nullable @Nullable org.bukkit.Location location, @Nullable BlockData.BlockType blockType, @Nullable @Nullable org.bukkit.block.Block block, @Nullable @Nullable org.bukkit.inventory.InventoryView inventoryView, @Nullable @Nullable org.bukkit.entity.LivingEntity livingEntity, @Nullable @Nullable org.bukkit.entity.LivingEntity targetEntity) Constructs a newGravePlayerEvent
.- Parameters:
grave
- The grave associated with the event.player
- The player involved in the event (non-null).location
- The location of the event.blockType
- The type of block involved in the event, if any.block
- The block involved in the event, if any.inventoryView
- The inventory view associated with the event, if any.livingEntity
- The living entity associated with the event, if any (usually same as player).targetEntity
- The entity targeted by the event, if any.
-
-
Method Details
-
hasInventoryView
public boolean hasInventoryView()Checks inventory view associated with the event.- Returns:
- The inventory view, or null if not applicable.
-
getInventoryView
@NotNull public @NotNull org.bukkit.inventory.InventoryView getInventoryView()Gets the inventory view associated with the event.- Returns:
- The inventory view, or null if not applicable.
-
hasPlayer
public boolean hasPlayer()Checks the player involved in the event.- Overrides:
hasPlayer
in classGraveEntityEvent
- Returns:
- The player involved in the event, or null if not applicable.
-
getPlayer
@NotNull public @NotNull org.bukkit.entity.Player getPlayer()Gets the player involved in the event.- Overrides:
getPlayer
in classGraveEntityEvent
- Returns:
- The player involved in the event, or null if not applicable.
-
getPlayerName
Gets the player name involved in the event.- Returns:
- The player name involved in the event, or null if not applicable.
-
getPlayerUniqueId
Gets the player unique ID involved in the event.- Returns:
- The player unique ID involved in the event, or null if not applicable.
-
getPlayerDisplayName
Gets the player display name involved in the event.- Returns:
- The player display name involved in the event, or null if not applicable.
-
isEntityActuallyPlayer
public boolean isEntityActuallyPlayer()Description copied from class:GraveEntityEvent
Determines if entity in an event is Player or Entity.- Overrides:
isEntityActuallyPlayer
in classGraveEntityEvent
- Returns:
- true if player, false otherwise
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()Gets the list of handlers for this event.- Overrides:
getHandlers
in classGraveEntityEvent
- Returns:
- The handler list for this event.
-
getHandlerList
@NotNull public static @NotNull org.bukkit.event.HandlerList getHandlerList()Gets the static list of handlers for this event.- Returns:
- The static handler list for this event.
-