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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic org.bukkit.event.HandlerListRequired by Bukkit's event system. -
Constructor Summary
ConstructorsConstructorDescriptionPlayerOpenProtectionEvent(@NotNull ProtectPlayer player, @NotNull BlockProtection blockProtection) Create an instance of this event. -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.event.HandlerListRequired by Bukkit's event system.org.bukkit.event.HandlerList@NotNull ProtectPlayerGet the player.@NotNull BlockProtectionGet the protection.booleanvoidsetCancelled(boolean b) Deprecated.Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Field Details
-
handlerList
public static org.bukkit.event.HandlerList handlerListRequired 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 protectionblockProtection- the protection that is being opened
-
-
Method Details
-
getPlayer
Get the player.- Returns:
- player that opens the protection
-
getProtection
Get the protection.- Returns:
- protection that is being opened
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable
-
setCancelled
Deprecated.- Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable
-
getHandlers
public org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlersin classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()Required by Bukkit's event system.- Returns:
- the handler list
-