Class AsyncPlayerPressKeyEvent


public class AsyncPlayerPressKeyEvent extends AsyncModifiedInputEvent
Called when a player presses or releases a key on a keyboard.
  • Constructor Details

    • AsyncPlayerPressKeyEvent

      public AsyncPlayerPressKeyEvent(@NotNull @NotNull SocketPlayer player, Key key, Action action, int flags)
      Constructs a new PlayerPressKeyEvent.
      Parameters:
      player - The player that pressed the key
      key - The key that was pressed
      action - The action of the key press
      flags - Bitfield for flags of the key press
  • Method Details

    • getKey

      @NotNull public @NotNull Key getKey()
      Gets the key that was pressed.
      Returns:
      The key that was pressed
    • getAction

      @NotNull public @NotNull Action getAction()
      Gets the action on the key that was pressed.
      Returns:
      The action on what was pressed