Package me.fami6xx.rpuniverse.core.api
Class LockOpenedEvent
java.lang.Object
org.bukkit.event.Event
me.fami6xx.rpuniverse.core.api.LockOpenedEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class LockOpenedEvent
extends org.bukkit.event.Event
implements org.bukkit.event.Cancellable
Event that is called when a lock is opened.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionLockOpenedEvent(Lock lock, org.bukkit.entity.Player player, org.bukkit.event.block.Action action)Constructs a new LockOpenedEvent. -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.event.block.ActionGets the action performed by the player.static org.bukkit.event.HandlerListGets the static handler list for this event.@NotNull org.bukkit.event.HandlerListGets the list of handlers for this event.getLock()Gets the lock that was opened.org.bukkit.entity.PlayerGets the player who opened the lock.booleanChecks if the event is cancelled.voidsetCancelled(boolean cancel)Sets the cancellation state of the event.Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
LockOpenedEvent
public LockOpenedEvent(Lock lock, org.bukkit.entity.Player player, org.bukkit.event.block.Action action)Constructs a new LockOpenedEvent.- Parameters:
lock- the lock that was openedplayer- the player who opened the lockaction- the action performed by the player
-
-
Method Details
-
getLock
Gets the lock that was opened.- Returns:
- the opened lock
-
getPlayer
public org.bukkit.entity.Player getPlayer()Gets the player who opened the lock.- Returns:
- the player who opened the lock
-
getAction
public org.bukkit.event.block.Action getAction()Gets the action performed by the player.- Returns:
- the action performed by the player
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()Gets the list of handlers for this event.- Specified by:
getHandlersin classorg.bukkit.event.Event- Returns:
- the list of handlers
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()Gets the static handler list for this event.- Returns:
- the static handler list
-
isCancelled
public boolean isCancelled()Checks if the event is cancelled.- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable- Returns:
- true if the event is cancelled, false otherwise
-
setCancelled
public void setCancelled(boolean cancel)Sets the cancellation state of the event.- Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable- Parameters:
cancel- true to cancel the event, false to uncancel
-