Class PlayerClientActivateVeinMinerEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
wtf.choco.veinminer.api.event.player.PlayerClientActivateVeinMinerEvent
- All Implemented Interfaces:
Cancellable
Called when a player toggles the vein mine state using a client-sided mod.
Note that this event is only fired for players that have installed the client-sided
VeinMiner mod when ActivationStrategy.CLIENT
is enabled and the client-configured
button was pressed or released.
The key that was pressed is not included in this event, only the action that the key was pressed and has changed the player's activation state.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Field Summary
Fields inherited from class org.bukkit.event.player.PlayerEvent
player
-
Constructor Summary
ConstructorDescriptionPlayerClientActivateVeinMinerEvent
(@NotNull Player player, boolean activated) Construct a newPlayerClientActivateVeinMinerEvent
. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull HandlerList
@NotNull HandlerList
boolean
Get the new activation state from the client.boolean
void
setCancelled
(boolean cancelled) Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayer
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
PlayerClientActivateVeinMinerEvent
Construct a newPlayerClientActivateVeinMinerEvent
.- Parameters:
player
- the player that changed activation stateactivated
- the new activation state
-
-
Method Details
-
isActivated
public boolean isActivated()Get the new activation state from the client. If true, the client pressed the activation key. If false, the key was released.- Returns:
- true if activated, false otherwise
-
setCancelled
public void setCancelled(boolean cancelled) - Specified by:
setCancelled
in interfaceCancellable
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceCancellable
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-