? Dynamic Shortcut 插件 (1.13 - 1.21+)
一款轻量级、高性能且专业的插件,允许服务器管理员通过高级变量支持、智能分隔符和动态补全功能,动态创建自定义的永久命令快捷方式。
✨ 特性
动态创建:在游戏中即时创建命令快捷方式,无需重启服务器。
智能 -- 分隔符:安全地将自定义快捷方式语法与原始目标命令分离,以支持复杂的多参数绑定。
动态变量引擎:* 内置占位符:使用 %block%、%item%、%player%、%world% 或 %mob% 获取原生实时补全列表。
自定义占位符:创建任意你需要的变量(例如 %amount%、%reason%)。插件会捕获玩家输入的内容并立即将其注入到最终命令中!
原生补全:完全支持基于变量的交互式补全功能,确保玩家准确输入命令。
结构化的 config.yml 存储:通过将语法、目标命令和权限整齐地分组,清理你的文件层级。
跨版本支持:从较旧版本(1.13)到最新的现代版本(1.21+)均可完美运行。
? 命令与用法
管理快捷方式变得极其简单。使用主命令前缀 /sc。
如何创建快捷方式:
/sc add <别名> [变量] -- <原始命令>
示例:
WorldEdit 快速设置(内置方块变量):
/sc add a %block% -- /set %block%
(当玩家输入 /a stone 时,服务器将在后台执行 //set stone)
自定义动态给予命令(内置物品与自定义数量变量):
/sc add drop %item% %amount% -- give %player% %item% %amount%
(当玩家输入 /drop diamond 64 时,将给予他们 64 个钻石)
动态临时封禁快捷指令(支持自定义变量):
/sc add b %target% %time% -- tempban %target% %time% 违反规则
管理员管理命令:
/sc list [page] — 查看所有活跃快捷方式及其权限的精美分页列表。
/sc delete <syntax> — 从服务器和配置文件中完全删除一个快捷方式。
/sc reload — 立即重新加载配置文件,并更新所有活动的玩家 Tab 补全列表。
? 权限与 LuckPerms 支持
本插件具备全自动动态权限系统,可完美兼容 LuckPerms、UltraPermissions 以及任何 Bukkit 兼容的权限管理插件。
- 管理权限
为了让工作人员或管理员能够管理快捷指令,请为他们授予:
shortcutplugin.admin — 允许使用 /sc 命令(默认:OP)
- 自动快捷指令权限(针对玩家)
每次创建新的快捷指令时,插件会自动根据命令的主要名称关联一个唯一的权限节点:
shortcut.command.<别名>
? 在 LuckPerms 中如何设置:
如果你创建了一个名为 /a(/sc add a %block% -- /set %block%)的快捷命令,其权限节点将是 shortcut.command.a。
授予特定等级(例如 Builder)使用 /a 的权限:
/lp group builder permission set shortcut.command.a true
授予一个组服务器上的所有快捷指令的使用权限:
/lp group admin permission set shortcut.command.* true
注意:如果玩家没有快捷指令所需的权限,该命令在 Tab-Completion 列表中将被完全隐藏!
⚙️ 配置 (config.yml)
插件会在 plugins/ShortcutPlugin/config.yml 内生成一个清晰、可读的分层文件结构。权限节点被完美地保存在对应命令的正上方:
YAML
ShortcutPlugin 配置文件
在这里手动定义你的快捷指令,或者在游戏中使用 /sc add!
shortcuts:
a_%block%:
permission: shortcut.command.a
syntax: a %block%
command: /set %block%
drop_%item%_%amount%:
permission: shortcut.command.drop
syntax: drop %item% %amount%
command: give %player% %item% %amount%
?️ 安装
下载 ShortcutPlugin.jar 文件。
将其放入服务器的 plugins/ 目录中。
重启或启动你的服务器。
享受全新的动态快捷方式吧!
对于可能发生的任何故障,我们不承担任何责任。
? Dynamic Shortcut Plugin (1.13 - 1.21+)
A lightweight, high-performance, and professional plugin that allows server administrators to create custom permanent command shortcuts dynamically with advanced variable support, smart delimiters, and dynamic tab-completion.
✨ Features
Dynamic Creation: Create command shortcuts instantly in-game without restarting your server.
Smart -- Delimiter: Safely separate your custom shortcut syntax from the original target command to allow complex multi-argument bindings.
Dynamic Variable Engine: * Built-in Placeholders: Use %block%, %item%, %player%, %world%, or %mob% for native, real-time tab-completion lists.
Custom Placeholders: Create any variable you want (e.g., %amount%, %reason%). The plugin captures what the player types and injects it instantly into the final command!
Native Tab-Completion: Fully supports interactive tab-completions based on your variables, ensuring players type commands accurately.
Structured config.yml Storage: Cleans up your file hierarchy by grouping syntax, target commands, and permissions nicely together.
Cross-Version Support: Works flawlessly from older versions (1.13) up to the latest modern versions (1.21+).
? Commands & Usage
Managing your shortcuts is incredibly easy. Use the main command prefix /sc.
How to create a shortcut:
/sc add <alias> [variables] -- <original_command>
Examples:
WorldEdit Quick Set (With Built-in Block Variable):
/sc add a %block% -- /set %block%
(When a player types /a stone, the server will execute //set stone behind the scenes)
Custom Dynamic Give Command (With Built-in Item & Custom Amount Variables):
/sc add drop %item% %amount% -- give %player% %item% %amount%
(When a player types /drop diamond 64, it will give them 64 diamonds)
Dynamic TempBan Shortcut (With Custom Variables):
/sc add b %target% %time% -- tempban %target% %time% Breaking Rules
Admin Management Commands:
/sc list [page] — View a beautiful, paginated list of all active shortcuts and their permissions.
/sc delete <syntax> — Completely deletes a shortcut from the server and the configuration file.
/sc reload — Instantly reloads the configuration and updates all active player tab-completions.
? Permissions & LuckPerms Support
This plugin features a fully automatic, dynamic permission system that integrates perfectly with LuckPerms, UltraPermissions, and any Bukkit-compatible permission manager.
- Administrative Permission
To allow staff or administrators to manage shortcuts, grant them:
shortcutplugin.admin — Allows the usage of /sc commands (Default: OP)
- Automatic Shortcut Permissions (For Players)
Every time you create a new shortcut, the plugin automatically links a unique permission node based on the command's primary name:
shortcut.command.<alias>
? How to set it up in LuckPerms:
If you created a shortcut named /a (/sc add a %block% -- /set %block%), the permission node will be shortcut.command.a.
Grant a specific rank (e.g., Builder) access to use /a:
/lp group builder permission set shortcut.command.a true
Grant a group access to ALL shortcuts on the server:
/lp group admin permission set shortcut.command.* true
Note: If a player does not have the required permission for a shortcut, the command will be completely hidden from their Tab-Completion list!
⚙️ Configuration (config.yml)
The plugin generates a clean, readable hierarchical file structure inside plugins/ShortcutPlugin/config.yml. The permission node is saved perfectly right above the command:
YAML
ShortcutPlugin Configuration File
Define your shortcuts here manually, or use /sc add in-game!
shortcuts:
a_%block%:
permission: shortcut.command.a
syntax: a %block%
command: /set %block%
drop_%item%_%amount%:
permission: shortcut.command.drop
syntax: drop %item% %amount%
command: give %player% %item% %amount%
?️ Installation
Download the ShortcutPlugin.jar file.
Drop it into your server's plugins/ directory.
Restart or start your server.
Enjoy your brand new dynamic shortcuts!
No responsibility is taken for any malfunction that may occur.
评论 0
登录后参与评分
还没有评论,来抢沙发吧