Class PlayerKeyEvent
java.lang.Object
net.risingworld.api.events.Event
net.risingworld.api.events.player.PlayerEvent
net.risingworld.api.events.player.PlayerKeyEvent
Called when a player presses or releases a key on his keyboard.
Please note that you have to register all keys that need to be forwarded to the API. It's also necessary to enable key input first (see
Example: Register keys and listen for key inputs
Please note that you have to register all keys that need to be forwarded to the API. It's also necessary to enable key input first (see
Player.setListenForKeyInput(boolean)
- See Also:
-
Field Summary
-
Method Summary
Methods inherited from class net.risingworld.api.events.player.PlayerEvent
getPlayer
-
Method Details
-
getKey
Gets the key that is actuated.- Returns:
- the key.
- See Also:
-
isPressed
public boolean isPressed()Gets whether the key is pressed or released.- Returns:
- true if the key was pressed, false if it was released.
-