Class PlayerBlockUnlockEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
wtf.choco.locksecurity.api.event.block.PlayerBlockUnlockEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class PlayerBlockUnlockEvent
extends org.bukkit.event.player.PlayerEvent
implements org.bukkit.event.Cancellable
Called when a player unlocks a 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
    • getKey

      @NotNull public org.bukkit.inventory.ItemStack getKey()
      Get the unsmithed key used to unlock the block. Changes made to this item will not be reflected in the player's inventory.
      Returns:
      the unsmithed key
    • getHand

      @NotNull public org.bukkit.inventory.EquipmentSlot getHand()
      Get the hand used in this event.
      Returns:
      the hand
    • isRequest

      public boolean isRequest()
      Check whether or not the player is only requesting to unlock the block. If a request is being made, the block will not be unlocked after this event has succeeded... another event will be called at a later time confirming the unlock.
      Returns:
      true if a request, false otherwise
    • 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()