Skip to main content
Keybind listeners allow you to repurpose standard Minecraft keys for custom server mechanics. By using packet-level interception, the extension ensures that these keys trigger actions even when the default vanilla behavior is blocked or unavailable.

⌨️ Available Listeners

Swap Hand (F)

Historically used to swap items between main and off-hand.
  • Common Use Case: Use it as a dedicated “Skill” or “Menu” key.
  • Pro Tip: Enable cancelAction to prevent players from accidentally moving items while triggering your custom mechanics.

Drop Item (Q)

Used to drop the item currently in hand.
  • Logic: The extension detects the drop attempt. If the player’s hand is empty (AIR), it can still trigger actions, effectively turning the “Empty Hand Drop” into a gesture.
  • Common Use Case: “Shout” command or “Quick Warp” when dropping an empty hand.

Advancements (L)

Toggles the Advancements menu.
  • Logic: Uses PacketEvents to intercept the ADVANCEMENT_TAB packet.
  • Common Use Case: Open a custom Quest Log or Server Guide instead of the vanilla advancement screen.
  • Note: This listener automatically forces the client UI to close after triggering the actions.

⚙️ How it Works

The extension uses two layers of listeners:
  1. Standard Listener: Handles standard Bukkit events (e.g., PlayerSwapHandItemsEvent).
  2. Packet Listener: Uses PacketEvents to catch raw packets before the server processes them. This ensures maximum responsiveness and allows for features like intercepting the Advancements key which doesn’t have a standard Bukkit toggle event.

📋 Example Configuration

swapHand:
  enabled: true
  cancelAction: true
  actions:
    - "cast_spell_action"
advancements:
  enabled: true
  actions:
    - "open_quest_log_action"