Skip to main content
Keybind listeners allow you to repurpose standard Minecraft keys for custom server mechanics. Each keybind supports enabled/disable, cancel action, delay, cooldown, drop count, hotbar slot targeting, and criteria conditions.

⌨ Available Input Types

SWAP_HAND — F Key

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

DROP — Q Key

Used to drop the item currently in hand.
  • Logic: The extension detects the drop attempt. If cancelAction is true, the default drop is cancelled and replaced with custom logic.
  • Custom Drop Count: Set dropCount to 1 (single item), -1 (full stack), or N (N items).

SNEAK — Shift Key

Fires when the player starts sneaking (not on release).
  • Common Use Case: Ability activation, toggling walk mode.
  • Pro Tip: Pair with cooldown to prevent spam.

SPRINT — Ctrl Key

Fires when the player starts sprinting (not on release).
  • Common Use Case: Sprint-triggered abilities.
  • Pro Tip: Same as SNEAK — add cooldown for spam prevention.

CHAT — T Key

Fires when the player opens the chat window.
  • Common Use Case: Trigger a custom UI or warning before chat opens.

COMMAND — / Key

Fires when the player types /.
  • Common Use Case: Check permissions or modify command behavior.

HOTBAR_SLOT — Number Keys 1-9

Fires when the player selects a specific hotbar slot.
  • Configuration: Set hotbarSlot (0-8) to target a specific slot.
  • Common Use Case: Equip-specific weapon triggers or slot-based abilities.

Input Type Quick Reference

InputTypeKeyCancelActionCustom Fields
SWAP_HANDF
DROPQdropCount: Int
SNEAKShift
SPRINTCtrl
CHATT
COMMAND/
HOTBAR_SLOT1-9hotbarSlot: Int (0-8)

How it Works

The extension uses standard Bukkit events — no packet library required. Each input type maps to a dedicated event handler:
InputTypeBukkit Event
SWAP_HANDPlayerSwapHandItemsEvent
DROPPlayerDropItemEvent
SNEAKPlayerToggleSneakEvent
SPRINTPlayerToggleSprintEvent
CHATAsyncChatEvent
COMMANDPlayerCommandPreprocessEvent
HOTBAR_SLOTPlayerItemHeldEvent

Per-Trigger Options

Each keybind definition includes these fields:
FieldTypeDefaultDescription
typeInputTypeSWAP_HANDThe input type to listen for
enabledBooleanfalseEnable/disable this handler
cancelActionBooleanfalseCancel the original game action
actionsActionEntry[][]Actions to execute
delayLong0Delay in ticks before execution
cooldownLong0Cooldown in ticks between triggers
dropCountInt1For DROP: 1=single, -1=stack, >1=N
hotbarSlotInt0For HOTBAR_SLOT: slot index (0-8)
criteriaCriteria[][]Conditions for the trigger to fire