Class AsyncPlayerPressKeyEvent
java.lang.Object
org.bukkit.event.Event
xyz.gmitch215.socketmc.events.SocketEvent
xyz.gmitch215.socketmc.events.input.AsyncModifiedInputEvent
xyz.gmitch215.socketmc.events.input.AsyncPlayerPressKeyEvent
Called when a player presses or releases a key on a keyboard.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Constructor Summary
ConstructorDescriptionAsyncPlayerPressKeyEvent
(@NotNull SocketPlayer player, Key key, Action action, int flags) Constructs a new PlayerPressKeyEvent. -
Method Summary
Methods inherited from class xyz.gmitch215.socketmc.events.input.AsyncModifiedInputEvent
getFlags, isAltPressed, isCapsLockPressed, isCtrlPressed, isNumLockPressed, isShiftPressed, isSuperPressed
Methods inherited from class xyz.gmitch215.socketmc.events.SocketEvent
getHandlerList, getHandlers, getPlayer, getSocketPlayer, toString
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
AsyncPlayerPressKeyEvent
public AsyncPlayerPressKeyEvent(@NotNull @NotNull SocketPlayer player, Key key, Action action, int flags) Constructs a new PlayerPressKeyEvent.- Parameters:
player
- The player that pressed the keykey
- The key that was pressedaction
- The action of the key pressflags
- Bitfield for flags of the key press
-
-
Method Details
-
getKey
Gets the key that was pressed.- Returns:
- The key that was pressed
-
getAction
Gets the action on the key that was pressed.- Returns:
- The action on what was pressed
-