Class KeyEvent

java.lang.Object
net.lynxclient.api.event.KeyEvent
All Implemented Interfaces:
Cancellable, Event

public final class KeyEvent extends Object implements Cancellable
A key was pressed or released while no text field has focus. Key codes are LynxClient's own (Keys), the same on every Minecraft version. Cancel to hide it from Minecraft.
  • Constructor Details

    • KeyEvent

      public KeyEvent()
  • Method Details

    • set

      public KeyEvent set(int key, KeyEvent.Action action, boolean inScreen)
      Reused by the version layer to avoid allocating per key press.
    • key

      public int key()
    • action

      public KeyEvent.Action action()
    • inScreen

      public boolean inScreen()
      true while a Minecraft screen (menu, chat, inventory …) is open
    • isCancelled

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

      public void setCancelled(boolean cancelled)
      Specified by:
      setCancelled in interface Cancellable