Interface HotkeyAction


public interface HotkeyAction
Hotkey actions are server-side actions, that are triggered by customizable hotkeys on the client.

Actions are transferred via HotkeyPacket to the server.

  • Field Details

  • Method Details

    • run

      boolean run(net.minecraft.world.entity.player.Player player)
      Handles the hotkey action on the server-side. Return true to indicate the action was triggered, false to allow other handlers for the hotkey to process the event.
    • register

      static void register(HotkeyAction hotkeyAction, String id)
      register a new HotkeyAction under an id

      HotkeyActions which are added later will be called first

      a Keybinding will be created automatically for every id