PlayerEvent.MouseClickedEvent:

-Added isCtrlPressed, isAltPressed, isShiftPressed, isMetaPressed, and keysDown fields for button combinations.
This commit is contained in:
c0508383 committed 2022-07-06 18:41:39 -05:00
1 parent 1c10f2ebf1
commit 9bd644f84a
4 files changed
+47 -5

No files matched your search

+2 -2
View File
@@ -442,9 +442,9 @@ public class EventHooks {
NpcAPI.EVENT_BUS.post(event);
}
public static void onPlayerMouseClicked(EntityPlayerMP player, int button, int mouseWheel, boolean buttonDown) {
public static void onPlayerMouseClicked(EntityPlayerMP player, int button, int mouseWheel, boolean buttonDown, boolean isCtrlPressed, boolean isShiftPressed, boolean isAltPressed, boolean isMetaPressed, int[] heldKeys) {
PlayerDataScript handler = ScriptController.Instance.playerScripts;
PlayerEvent.MouseClickedEvent event = new PlayerEvent.MouseClickedEvent((IPlayer)NpcAPI.Instance().getIEntity(player), button, mouseWheel, buttonDown);
PlayerEvent.MouseClickedEvent event = new PlayerEvent.MouseClickedEvent((IPlayer)NpcAPI.Instance().getIEntity(player), button, mouseWheel, buttonDown, isCtrlPressed, isAltPressed, isShiftPressed, isMetaPressed, heldKeys);
handler.callScript(EnumScriptType.MOUSE_CLICKED, event);
NpcAPI.EVENT_BUS.post(event);
}