Class KeyEvent
java.lang.Object
net.lynxclient.api.event.KeyEvent
- All Implemented Interfaces:
Cancellable, Event
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.-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaction()booleaninScreen()true while a Minecraft screen (menu, chat, inventory …) is openbooleanintkey()set(int key, KeyEvent.Action action, boolean inScreen) Reused by the version layer to avoid allocating per key press.voidsetCancelled(boolean cancelled)
-
Constructor Details
-
KeyEvent
public KeyEvent()
-
-
Method Details
-
set
Reused by the version layer to avoid allocating per key press. -
key
public int key() -
action
-
inScreen
public boolean inScreen()true while a Minecraft screen (menu, chat, inventory …) is open -
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceCancellable
-
setCancelled
public void setCancelled(boolean cancelled) - Specified by:
setCancelledin interfaceCancellable
-