▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Keybind

Keybind

⌨️ Bind keys to server-side commands. Press a key, the server runs a command.

Оцените первым
677
3

⌨️ Keybind

Bind keys to server-side commands. Press a key, the server runs a command.

Client Mod (Fabric)Server Plugin (Paper)

EnvironmentLoaderMC VersionStatus
ClientFabric1.21.x, 26.xReleased
ServerPaper1.18.2+Released
ClientNeoForge1.21.x, 26.xNot released
ClientForge1.21.x, 26.xNot released

Note: Both the Server Plugin and the Fabric Client Mod must be installed for the mod to function. On servers without the plugin, no keybinds will be registered or available.


✨ Features

  • 🔗 Server-Driven: Actions are defined entirely on the server and synced to the client on join.
  • 📁 Per-Server Storage: Key assignments are saved per server IP in .minecraft/config/keybind-servers/ and never overwritten on rejoin.
  • 🛠️ Dynamic Registration: New server actions appear in your Settings → Controls menu without restarting the game.
  • 🏷️ Custom Display Names: Server owners set friendly names (e.g., "Teleport to Spawn" instead of spawn).
  • ⏱️ Dual Cooldowns: Both a global cooldown (between any actions) and per-action cooldowns prevent spam.
  • 🔐 Permission Support: Each action supports an optional extra permission node on top of keybind.use.
  • 📡 Plugin Messaging: Uses keybind:main / keybind:sync plugin message channels. Falls back to /kbind <action> if the packet channel is unavailable.
  • 🧹 Stale Action Cleanup: Obsolete actions from previous sessions are automatically removed from the Controls menu and saved config.
  • 🌍 Fabric Client: Released for Minecraft 1.21.x and 26.x. NeoForge and Forge builds are not released yet.

🚀 How It Works

  1. Sync: 1 second after a player joins, the plugin sends all configured actions (name, display name, default key) over the keybind:sync channel.
  2. Registration: The mod registers each action as a native Minecraft keybind under the Keybind category in Settings → Controls.
  3. Trigger: When a key is pressed (and no screen is open), the mod sends the action name over the keybind:main channel.
  4. Execution: The plugin validates the action name (alphanumeric + underscores only), checks permissions and cooldowns, then runs the command.

🛠️ Installation

Server Side

  1. Place Keybind-Plugin-1.0.2.jar into your plugins/ folder.
  2. Restart the server — plugins/Keybind/config.yml is generated automatically.
  3. Edit config.yml to define your actions, then run /kbind reload.

Client Side (Fabric only)

  1. Install the Fabric jar (Fabric-Keybind-1.21-*.jar or Fabric-Keybind-26-*.jar) from Modrinth into .minecraft/mods/.
  2. Requires Fabric Loader and Fabric API.
  3. Launch the game and connect to a server running the plugin.

⚙️ Configuration

plugins/Keybind/config.yml

# Global cooldown between any keybind actions (milliseconds)
global-cooldown: 500

actions:
  spawn:
    command: "spawn"              # Command to run (without /)
    display-name: "Spawn"        # Label shown in Controls menu
    default-key: "LEFT_BRACKET"  # Suggested key for first-time players
    permission: ""               # Optional extra permission node (leave empty for none)
    cooldown: 1000               # Per-action cooldown (ms); defaults to global-cooldown
    console: false               # true = run as console with {player} replaced by player name

  home:
    command: "home"
    display-name: "Home"
    default-key: "RIGHT_BRACKET"
    permission: ""
    cooldown: 1000
    console: false

Notes:

  • Action names must be alphanumeric + underscores only (e.g. my_action).
  • console: true runs the command as the console sender. Use {player} as a placeholder for the player's name (e.g. command: "tp {player} spawn").
  • default-key is only applied the first time a player connects. Their saved binding is used on subsequent joins.

⌨️ Supported Keys

Keyboard

CategoryValues
LettersAZ
Numbers09
FunctionF1F25
ArrowsUP, DOWN, LEFT, RIGHT
NavigationPAGE_UP, PAGE_DOWN, HOME, END, INSERT, DELETE
SpecialSPACE, ENTER, TAB, BACKSPACE, ESCAPE, PAUSE
Lock keysCAPS_LOCK, SCROLL_LOCK, NUM_LOCK
OtherPRINT_SCREEN, MENU
ModifiersLEFT_SHIFT, LEFT_CONTROL (or LEFT_CTRL), LEFT_ALT, LEFT_SUPER, RIGHT_SHIFT, RIGHT_CONTROL (or RIGHT_CTRL), RIGHT_ALT, RIGHT_SUPER
NumpadKP_0KP_9, KP_ADD, KP_SUBTRACT, KP_MULTIPLY, KP_DIVIDE, KP_DECIMAL, KP_ENTER, KP_EQUAL
SymbolsLEFT_BRACKET, RIGHT_BRACKET, BACKSLASH, SEMICOLON, APOSTROPHE, COMMA, PERIOD, SLASH, GRAVE_ACCENT, MINUS, EQUAL — or the character directly: [, ], \, ;, ', ,, ., /, `, -, =
World keysWORLD_1, WORLD_2 (locale-specific keys on some keyboards)

Mouse

ValueAliasesButton
MOUSE_LEFTMOUSE_1Left click
MOUSE_RIGHTMOUSE_2Right click
MOUSE_MIDDLEMOUSE_3Middle click
MOUSE_4MOUSE_8Side/extra buttons

📜 Commands & Permissions

CommandDescriptionPermission
/kbind <action>Manually trigger an actionkeybind.use
/kbind listList all configured action names(any)
/kbind reloadReload config and re-sync all online playerskeybind.admin
PermissionDescriptionDefault
keybind.useRequired to trigger any actiontrue (everyone)
keybind.adminAccess to /kbind reloadop
keybind.bypass.cooldownIgnore all cooldownsop

Часто задаваемые вопросы

Совместимость

Minecraft: Java Edition

26.2.x26.1.x1.21.x1.20.x1.19.x1.18.x

Поддерживаемые окружения

Клиент

Ссылки


Создатели

Детали

Лицензия:
Опубликован:3 месяца назад
Обновлён:1 неделю назад
Главная