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

public class PlayerClientActivateVeinMinerEvent extends PlayerEvent implements 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.

  • Constructor Details

    • PlayerClientActivateVeinMinerEvent

      public PlayerClientActivateVeinMinerEvent(@NotNull @NotNull Player player, boolean activated)
      Parameters:
      player - the player that changed activation state
      activated - 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 interface Cancellable
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface Cancellable
    • getHandlers

      @NotNull public @NotNull HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
    • getHandlerList

      @NotNull public static @NotNull HandlerList getHandlerList()