Class PlayerOpenProtectionEvent

java.lang.Object
org.bukkit.event.Event
me.angeschossen.chestprotect.api.events.PlayerOpenProtectionEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class PlayerOpenProtectionEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
Called whenever a player opens a protection. For example a door, chest and so on.
  • Field Details

    • handlerList

      public static org.bukkit.event.HandlerList handlerList
      Required by Bukkit's event system.
  • Constructor Details

    • PlayerOpenProtectionEvent

      public PlayerOpenProtectionEvent(@NotNull @NotNull ProtectPlayer player, @NotNull @NotNull BlockProtection blockProtection)
      Create an instance of this event.
      Parameters:
      player - the player that opens the protection
      blockProtection - the protection that is being opened
  • Method Details

    • getPlayer

      @NotNull public @NotNull ProtectPlayer getPlayer()
      Get the player.
      Returns:
      player that opens the protection
    • getProtection

      @NotNull public @NotNull BlockProtection getProtection()
      Get the protection.
      Returns:
      protection that is being opened
    • isCancelled

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

      @Deprecated public void setCancelled(boolean b)
      Deprecated.
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
    • getHandlers

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

      public static org.bukkit.event.HandlerList getHandlerList()
      Required by Bukkit's event system.
      Returns:
      the handler list