Class PlayerInteractLockedBlockEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
wtf.choco.locksecurity.api.event.block.PlayerInteractLockedBlockEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class PlayerInteractLockedBlockEvent
extends org.bukkit.event.player.PlayerEvent
implements org.bukkit.event.Cancellable
Called when a player interacts with a locked block.
- Since:
- 3.0.0
- Author:
- Parker Hawke - Choco
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PlayerInteractLockedBlockEvent.Action
The action that occurred in this event. -
Constructor Summary
Constructors Constructor Description PlayerInteractLockedBlockEvent(ILockSecurityPlayer player, ILockedBlock lockedBlock, org.bukkit.inventory.ItemStack item, org.bukkit.inventory.EquipmentSlot hand, PlayerInteractLockedBlockEvent.Action action)
-
Method Summary
Modifier and Type Method Description PlayerInteractLockedBlockEvent.Action
getAction()
Get this event's action.org.bukkit.inventory.EquipmentSlot
getHand()
Get the hand used in this event.static org.bukkit.event.HandlerList
getHandlerList()
org.bukkit.event.HandlerList
getHandlers()
org.bukkit.inventory.ItemStack
getItem()
Get the item used to interact with this block, if any.ILockedBlock
getLockedBlock()
Get theILockedBlock
involved in this event.ILockSecurityPlayer
getPlayerWrapper()
Get theILockSecurityPlayer
wrapper for the player involved in this event.boolean
isCancelled()
void
setCancelled(boolean cancel)
-
Constructor Details
-
PlayerInteractLockedBlockEvent
public PlayerInteractLockedBlockEvent(@NotNull ILockSecurityPlayer player, @NotNull ILockedBlock lockedBlock, @Nullable org.bukkit.inventory.ItemStack item, @NotNull org.bukkit.inventory.EquipmentSlot hand, @NotNull PlayerInteractLockedBlockEvent.Action action)
-
-
Method Details
-
getPlayerWrapper
Get theILockSecurityPlayer
wrapper for the player involved in this event.- Returns:
- the player wrapper
-
getLockedBlock
Get theILockedBlock
involved in this event.- Returns:
- the locked block
-
getItem
@Nullable public org.bukkit.inventory.ItemStack getItem()Get the item used to interact with this block, if any.- Returns:
- the item used. null if none
-
getHand
@NotNull public org.bukkit.inventory.EquipmentSlot getHand()Get the hand used in this event.- Returns:
- the hand
-
getAction
Get this event's action.- Returns:
- the action
-
setCancelled
public void setCancelled(boolean cancel)- Specified by:
setCancelled
in interfaceorg.bukkit.event.Cancellable
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceorg.bukkit.event.Cancellable
-
getHandlers
@NotNull public org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlers
in classorg.bukkit.event.Event
-
getHandlerList
@NotNull public static org.bukkit.event.HandlerList getHandlerList()
-