Hotkeys
Hotkeys the player picks in your plugin's settings.
Final classRLPlugins API
public final class HotkeysAdd a Keybind item to your config:
{@code.
Members
Static methods
- Hotkeyregister(Supplier<Keybind>, Runnable)
Runs
onPresseach time the player presses the bound key. - Hotkeyregister(Supplier<Keybind>, Runnable, Runnable)
Runs
onPresswhen the bound key goes down andonRelease(may be null) when it comes up.
register(Supplier<Keybind>, Runnable)static
public static Hotkey register(Supplier<Keybind> keybind, Runnable onPress)Runs onPress each time the player presses the bound key.
Parameters
keybind- Keybind.
onPress- On press.
register(Supplier<Keybind>, Runnable, Runnable)static
public static Hotkey register(Supplier<Keybind> keybind, Runnable onPress, Runnable onRelease)Runs onPress when the bound key goes down and onRelease (may be null) when it comes up.
Parameters
keybind- Keybind.
onPress- On press.
onRelease- On release.
Also allowed
Every class has these, as in plain Java.
equals, toString