mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 06:09:05 +00:00
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:
1 parent
5c9424bac8
commit
09f76d84c4
7 files changed
+25
-23
No files matched your search
@@ -395,9 +395,9 @@ public class EventHooks {
|
||||
WrapperNpcAPI.EVENT_BUS.post(event);
|
||||
}
|
||||
|
||||
public static void onPlayerKeyPressed(EntityPlayerMP player, int button, boolean isCtrlPressed, boolean isShiftPressed, boolean isAltPressed, boolean isMetaPressed, boolean repeatKey, boolean buttonDown, int[] heldKeys) {
|
||||
public static void onPlayerKeyPressed(EntityPlayerMP player, int button, boolean isCtrlPressed, boolean isShiftPressed, boolean isAltPressed, boolean isMetaPressed, boolean buttonDown, int[] heldKeys) {
|
||||
PlayerDataScript handler = ScriptController.Instance.playerScripts;
|
||||
KeyPressedEvent event = new KeyPressedEvent((ScriptPlayer)ScriptController.Instance.getScriptForEntity(player), button, isCtrlPressed, isAltPressed, isShiftPressed, isMetaPressed, repeatKey, buttonDown, heldKeys);
|
||||
KeyPressedEvent event = new KeyPressedEvent((ScriptPlayer)ScriptController.Instance.getScriptForEntity(player), button, isCtrlPressed, isAltPressed, isShiftPressed, isMetaPressed, buttonDown, heldKeys);
|
||||
handler.callScript(EnumScriptType.KEY_PRESSED, event);
|
||||
WrapperNpcAPI.EVENT_BUS.post(event);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user