mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 06:25:11 +00:00
Implemented KeyPressed event.
This commit is contained in:
1 parent
1ee14920ff
commit
6c8c7671b8
7 files changed
+57
-18
No files matched your search
@@ -149,7 +149,7 @@ public class EventHooks {
|
||||
public static void onPlayerKeyPressed(EntityPlayerMP player, int button, boolean isCtrlPressed, boolean isShiftPressed, boolean isAltPressed, boolean isMetaPressed) {
|
||||
PlayerDataScript handler = PlayerData.get(player).scriptData;
|
||||
KeyPressedEvent event = new KeyPressedEvent(handler.getPlayer(), button, isCtrlPressed, isAltPressed, isShiftPressed, isMetaPressed);
|
||||
handler.callScript(EnumScriptType.KEY_PRESSED, event);
|
||||
handler.callScript(EnumScriptType.KEY_PRESSED, event, "key", button, "isCtrlPressed", isCtrlPressed, "isAltPressed", isAltPressed, "isShiftPressed", isShiftPressed, "isMetaPressed", isMetaPressed);
|
||||
WrapperNpcAPI.EVENT_BUS.post(event);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user