⌨️ 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
cancelActionto 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_TABpacket. - 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:- Standard Listener: Handles standard Bukkit events (e.g.,
PlayerSwapHandItemsEvent). - 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.