mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 02:15:11 +00:00
Player key events now detect key presses as well, not just releases.
This commit is contained in:
1 parent
40b39d3b20
commit
27b88c1fce
4 files changed
+22
-21
No files matched your search
@@ -41,25 +41,29 @@ public class PlayerEvent extends CustomNPCsEvent {
|
||||
public final boolean isAltPressed;
|
||||
public final boolean isShiftPressed;
|
||||
public final boolean isMetaPressed;
|
||||
public final boolean keyDown;
|
||||
|
||||
public KeyPressedEvent(IPlayer player, int key, boolean isCtrlPressed, boolean isAltPressed, boolean isShiftPressed, boolean isMetaPressed) {
|
||||
public KeyPressedEvent(IPlayer player, int key, boolean isCtrlPressed, boolean isAltPressed, boolean isShiftPressed, boolean isMetaPressed, boolean keyDown) {
|
||||
super(player);
|
||||
this.key = key;
|
||||
this.isCtrlPressed = isCtrlPressed;
|
||||
this.isAltPressed = isAltPressed;
|
||||
this.isShiftPressed = isShiftPressed;
|
||||
this.isMetaPressed = isMetaPressed;
|
||||
this.keyDown = keyDown;
|
||||
}
|
||||
}
|
||||
|
||||
public static class MouseClickedEvent extends PlayerEvent {
|
||||
public final int button;
|
||||
public final int mouseWheel;
|
||||
public final boolean buttonDown;
|
||||
|
||||
public MouseClickedEvent(IPlayer player, int button, int mouseWheel){
|
||||
public MouseClickedEvent(IPlayer player, int button, int mouseWheel, boolean buttonDown){
|
||||
super(player);
|
||||
this.button = button;
|
||||
this.mouseWheel = mouseWheel;
|
||||
this.buttonDown = buttonDown;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user