GuiContainerNPCInterface, GuiNPCInterface, GuiNpcMenu all disable repeat key events when closed like all other GUIs now.

The keyEvent scripted event no longer detects repeat held key presses.
This commit is contained in:
Luis C.M committed 2022-05-03 13:34:56 -05:00
1 parent 5c9424bac8
commit 09f76d84c4
7 files changed
+25 -23

No files matched your search

@@ -41,18 +41,16 @@ 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 repeatKey, boolean keyDown, int[] heldKeys) {
public KeyPressedEvent(IPlayer player, int key, boolean isCtrlPressed, boolean isAltPressed, boolean isShiftPressed, boolean isMetaPressed, 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;
}