Package dev.cwhead.GravesX.event
Class GravePistonExtendEvent
java.lang.Object
org.bukkit.event.Event
dev.cwhead.GravesX.event.graveevent.GraveEvent
dev.cwhead.GravesX.event.GravePistonExtendEvent
- All Implemented Interfaces:
Addon
,org.bukkit.event.Cancellable
- Direct Known Subclasses:
GravePistonExtendEvent
Represents an event that occurs when a piston extends into a grave location.
This event extends GraveEvent
and is cancellable, allowing event listeners
to prevent the piston from extending.
-
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
ConstructorsConstructorDescriptionGravePistonExtendEvent
(@NotNull Grave grave, @Nullable org.bukkit.Location location, @NotNull org.bukkit.block.Block pistonBlock, @NotNull org.bukkit.block.BlockFace direction, @NotNull List<org.bukkit.block.Block> movedBlocks) Constructs a newGravePistonExtendEvent
. -
Method Summary
Modifier and TypeMethodDescription@NotNull org.bukkit.block.BlockFace
Gets the direction in which the piston is extending.static @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 List
<org.bukkit.block.Block> Gets the list of blocks that are being moved by the piston during this extension.@NotNull org.bukkit.block.Block
Gets the piston block involved in this event.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
-
Constructor Details
-
GravePistonExtendEvent
public GravePistonExtendEvent(@NotNull @NotNull Grave grave, @Nullable @Nullable org.bukkit.Location location, @NotNull @NotNull org.bukkit.block.Block pistonBlock, @NotNull @NotNull org.bukkit.block.BlockFace direction, @NotNull @NotNull List<org.bukkit.block.Block> movedBlocks) Constructs a newGravePistonExtendEvent
.- Parameters:
grave
- The grave associated with the event.location
- The location of the event (nullable).pistonBlock
- The piston block involved in the event.direction
- The direction the piston is extending.movedBlocks
- The list of blocks being moved by the piston.
-
-
Method Details
-
getPistonBlock
@NotNull public @NotNull org.bukkit.block.Block getPistonBlock()Gets the piston block involved in this event.- Returns:
- the piston block.
-
getDirection
@NotNull public @NotNull org.bukkit.block.BlockFace getDirection()Gets the direction in which the piston is extending.- Returns:
- the direction.
-
getMovedBlocks
Gets the list of blocks that are being moved by the piston during this extension.- Returns:
- moved blocks.
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()Gets the list of handlers for this event.- Overrides:
getHandlers
in classGraveEvent
- 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.
-