mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 09:09:08 +00:00
Added the repeatKey field to KeyEvent, distinguishing whether the event was triggered by the key being held down or the first press.
This commit is contained in:
1 parent
4c0ff9bf2e
commit
5c9424bac8
4 files changed
+13
-9
No files matched your search
@@ -41,16 +41,18 @@ public class PlayerEvent extends CustomNPCsEvent {
|
||||
public final boolean isAltPressed;
|
||||
public final boolean isShiftPressed;
|
||||
public final boolean isMetaPressed;
|
||||
public final boolean repeatKey;
|
||||
public final boolean keyDown;
|
||||
public final int[] keysDown;
|
||||
|
||||
public KeyPressedEvent(IPlayer player, int key, boolean isCtrlPressed, boolean isAltPressed, boolean isShiftPressed, boolean isMetaPressed, boolean keyDown, int[] heldKeys) {
|
||||
public KeyPressedEvent(IPlayer player, int key, boolean isCtrlPressed, boolean isAltPressed, boolean isShiftPressed, boolean isMetaPressed, boolean repeatKey, boolean keyDown, int[] heldKeys) {
|
||||
super(player);
|
||||
this.key = key;
|
||||
this.isCtrlPressed = isCtrlPressed;
|
||||
this.isAltPressed = isAltPressed;
|
||||
this.isShiftPressed = isShiftPressed;
|
||||
this.isMetaPressed = isMetaPressed;
|
||||
this.repeatKey = repeatKey;
|
||||
this.keyDown = keyDown;
|
||||
this.keysDown = heldKeys;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user