Class AsyncModifiedInputEvent

java.lang.Object
org.bukkit.event.Event
xyz.gmitch215.socketmc.events.SocketEvent
xyz.gmitch215.socketmc.events.input.AsyncModifiedInputEvent
Direct Known Subclasses:
AsyncPlayerClickMouseEvent, AsyncPlayerPressKeyEvent

public abstract class AsyncModifiedInputEvent extends SocketEvent

Represents an input event that can be modified using a keyboard modifier (Shift, Ctrl, Caps Lock, etc.).

Input events hook directly into the internal KeyboardHandler and are therefore called before any other click or input-related events.

  • Constructor Details

    • AsyncModifiedInputEvent

      public AsyncModifiedInputEvent(@NotNull @NotNull SocketPlayer player, int flags)
      Constructs a new ModifiedInputEvent.
      Parameters:
      player - The player that triggered the event.
      flags - The flags that were active when the event occurred.
  • Method Details

    • getFlags

      public int getFlags()
      Gets all of the flags on the key press.
      Returns:
      Bitfield for flags of the key press
    • isShiftPressed

      public boolean isShiftPressed()
      Checks if a shift key was pressed.
      Returns:
      True if a shift key was pressed during the key press
    • isCtrlPressed

      public boolean isCtrlPressed()
      Checks if a control key was pressed.
      Returns:
      True if a control key was pressed during the key press
    • isAltPressed

      public boolean isAltPressed()
      Checks if an alt key was pressed.
      Returns:
      True if an alt key was pressed during the key press
    • isSuperPressed

      public boolean isSuperPressed()
      Checks if a super key was pressed.
      Returns:
      True if a super key was pressed during the key press
    • isCapsLockPressed

      public boolean isCapsLockPressed()
      Checks if caps lock is enabled.
      Returns:
      True if the caps lock key was enabled during the key press
    • isNumLockPressed

      public boolean isNumLockPressed()
      Checks if num lock is enabled.
      Returns:
      True if the num lock key was enabled during the key press