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
  • Constructor Details

  • Method Details

    • getPlayerWrapper

      @NotNull public ILockSecurityPlayer getPlayerWrapper()
      Get the ILockSecurityPlayer wrapper for the player involved in this event.
      Returns:
      the player wrapper
    • getLockedBlock

      @NotNull public ILockedBlock getLockedBlock()
      Get the ILockedBlock 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

      @NotNull public PlayerInteractLockedBlockEvent.Action getAction()
      Get this event's action.
      Returns:
      the action
    • setCancelled

      public void setCancelled​(boolean cancel)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
    • getHandlers

      @NotNull public org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event
    • getHandlerList

      @NotNull public static org.bukkit.event.HandlerList getHandlerList()