mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 11:29:05 +00:00
PlayerEvent.MouseClickedEvent:
-Added isCtrlPressed, isAltPressed, isShiftPressed, isMetaPressed, and keysDown fields for button combinations.
This commit is contained in:
1 parent
1c10f2ebf1
commit
9bd644f84a
4 files changed
+47
-5
No files matched your search
@@ -58,15 +58,26 @@ public class PlayerEvent extends CustomNPCsEvent {
|
||||
}
|
||||
|
||||
public static class MouseClickedEvent extends PlayerEvent {
|
||||
public final boolean isCtrlPressed;
|
||||
public final boolean isAltPressed;
|
||||
public final boolean isShiftPressed;
|
||||
public final boolean isMetaPressed;
|
||||
public final int[] keysDown;
|
||||
|
||||
public final int button;
|
||||
public final int mouseWheel;
|
||||
public final boolean buttonDown;
|
||||
|
||||
public MouseClickedEvent(IPlayer player, int button, int mouseWheel, boolean buttonDown){
|
||||
public MouseClickedEvent(IPlayer player, int button, int mouseWheel, boolean buttonDown, boolean isCtrlPressed, boolean isAltPressed, boolean isShiftPressed, boolean isMetaPressed, int[] heldKeys){
|
||||
super(player);
|
||||
this.button = button;
|
||||
this.mouseWheel = mouseWheel;
|
||||
this.buttonDown = buttonDown;
|
||||
this.isCtrlPressed = isCtrlPressed;
|
||||
this.isAltPressed = isAltPressed;
|
||||
this.isShiftPressed = isShiftPressed;
|
||||
this.isMetaPressed = isMetaPressed;
|
||||
this.keysDown = heldKeys;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user