注意: 此描述由 AI 生成,欢迎提供您的建议!
⚡ SimpleCommands
无需编写代码即可创建自定义命令 —— 适用于 Paper Minecraft 1.20+ 服务器
SimpleCommands 允许服务器管理员在简单的配置文件(或游戏内实时)中定义自定义命令。每个自定义命令会按顺序执行一个或多个真实命令——可以是作为 玩家 或作为 控制台 执行——并支持冷却时间、权限、别名、占位符以及可选的时间窗口。玩家输入 /spawn,而不是 /sc spawn:命令直接注册到服务器中,表现如同原生命令。
✨ 主要功能
?️ 无需代码的自定义命令
- 在 YAML 文件或游戏内定义
/spawn、/discord、/shop 等更多命令
- 每个命令按顺序执行一组真实命令
- 无需 Java,无需重新编译——只需编辑并运行
/sc reload
? 以玩家或控制台身份运行
- PLAYER(玩家) → 使用玩家自身的权限运行
- CONSOLE(控制台) → 拥有完全权限(传送、给予物品等)
- 非常适合让玩家安全地触发仅限管理员的操作
⏱️ 持久化冷却时间
- 每个命令针对每个玩家的独立冷却时间
- 保存至磁盘 —— 即使玩家注销或服务器重启也不会丢失
- 工作人员可绕过此限制(权限
simplecommands.cooldown.bypass)
? 灵活的权限设置
EVERYONE → 对所有人开放
OP → 仅限操作员
PERMISSION → 自定义节点,完全兼容 LuckPerms
? 占位符
{player}、{uuid}、{world}、{x}、{y}、{z}
- 可扩展架构——在不修改现有代码的情况下添加新占位符
? 限时命令
- 可选的
available-from / available-until 时间窗口
- 非常适合活动、促销和限时奖励
? 代理支持 (Velocity / BungeeCord)
- 通过
[server] <name> 动作标签在不同服务器间移动玩家
- 在普通代理命令 (
/server) 无法工作的场景下生效——通过插件消息发送
? 音效效果
- 在命令执行 之前 和 之后 播放声音
- 使用 Bukkit 声音名称 (
ENTITY_ENDERMAN_TELEPORT) 或命名空间键 (minecraft:entity.player.levelup)
- 无效的声音名称会被安全跳过——不会崩溃,仅在控制台中显示警告
⏳ 带动作栏倒计时的延迟
- 命令执行前可选的延迟时间(例如:传送前等待 3 秒)
- 动作栏倒计时 —— 显示剩余时间(可使用
{time} 和 {total} 自定义文本)
- 冻结模式 —— 在延迟期间可选择阻止玩家移动(行走、跳跃)
- 头部旋转仍被允许,玩家只是无法走开
? 命名参数
- 使用单个命令条目定义
/warp spawn、/warp shop、/warp nether
- 每个参数映射到其各自的命令列表
/warp(无参数)运行默认的 commands 列表(例如:用法提示)
- Tab 补全 自动建议可用的参数名称
- 游戏内可编辑:
/sc edit warp addarg mine tp {player} 100 64 200
?️ 防循环执行
- 检测到直接或间接调用自身的命令时会中止执行
- 不会出现
StackOverflowError,也不会因配置错误的命令导致服务器崩溃
♻️ 热重载与翻译
/sc reload 应用更改而无需重启服务器
- 所有消息均位于
lang.yml 中——完全支持翻译
? 安装
- 从 GitHub 或 Modrinth 下载
.jar 文件
- 放入
plugins/ 文件夹
- 重启服务器
- 编辑
plugins/SimpleCommands/commands.yml(自动生成)
- 运行
/sc reload
要求: Paper(或其分支)1.20.x–1.21.x,Java 21。可选: LuckPerms。
? 玩家命令
/spawn # 或者你在 commands.yml 中定义的任意命令
玩家只需输入你创建的命令名称及其别名。
? 管理员命令
/sc create <name> <command...> # 创建新命令
/sc delete <name> # 删除命令
/sc edit <name> <field> <value...> # 编辑单个字段
/sc list # 列出所有命令及其状态
/sc info <name> # 显示命令的完整详情
/sc reload # 重载配置 + 命令
/simplecommands 和 /sc 可以互换使用。
? 权限
| 权限 |
默认值 |
描述 |
simplecommands.admin |
op |
所有管理员命令 |
simplecommands.admin.create |
op |
/sc create |
simplecommands.admin.delete |
op |
/sc delete |
simplecommands.admin.edit |
op |
/sc edit |
simplecommands.admin.list |
op |
/sc list |
simplecommands.admin.info |
op |
/sc info |
simplecommands.admin.reload |
op |
/sc reload |
simplecommands.cooldown.bypass |
op |
忽略自定义命令的冷却时间 |
使用 permission-mode: PERMISSION 的自定义命令需要在其 permission 字段中设置的相应节点(例如 simplecommands.cmd.spawn)。
示例:LuckPerms
/lp user <player> permission set simplecommands.cmd.spawn true
/lp group admin permission set simplecommands.admin true
⚙️ 配置
SimpleCommands 将配置拆分为多个专注的文件:
| 文件 |
用途 |
config.yml |
插件常规设置 |
lang.yml |
所有插件消息(可翻译) |
commands.yml |
你的自定义命令定义 |
cooldowns.yml |
已保存的冷却时间(自动生成) |
命令定义
commands:
spawn:
enabled: true
description: "Teleport to spawn."
permission-mode: PERMISSION
permission: simplecommands.cmd.spawn
aliases:
- lobby
- hub
cooldown: 5
execute-as: CONSOLE
commands:
- "tp {player} 0 78 0"
message: "&aTeleported to spawn."
字段参考
| 字段 |
描述 |
enabled |
true/false。禁用的命令仍会注册,但拒绝执行 |
description |
在 /sc list 和 /sc info 中显示 |
permission-mode |
EVERYONE、OP 或 PERMISSION |
permission |
当模式为 PERMISSION 时检查的权限节点 |
aliases |
命令的备用名称 |
cooldown |
使用间隔秒数(0 = 无冷却)。重启后保留 |
execute-as |
PLAYER(玩家权限)或 CONSOLE(完全权限) |
commands |
按顺序执行的命令列表(无需前导 /) |
message |
执行后的可选消息 |
available-from / available-until |
可选的 yyyy-MM-dd HH:mm 时间窗口 |
sound-before |
执行前播放的音效(Bukkit 名称或命名空间键) |
sound-after |
执行完成后播放的音效 |
delay |
运行命令前的等待秒数(0 = 立即) |
delay-message |
倒计时期间动作栏文本({time} = 剩余时间,{total} = 总时间) |
delay-freeze |
true/false。延迟期间禁止移动 |
args |
命名参数映射表 — 每个键是参数名,值是命令列表 |
占位符
| 占位符 |
含义 |
{player} |
玩家名称 |
{uuid} |
玩家 UUID |
{world} |
世界名称 |
{x} {y} {z} |
方块坐标 |
颜色代码
&a &c ... # 经典颜色代码
&#RRGGBB # 十六进制颜色(例如 &#ff8800)
有关所有选项,请参阅完整的 commands.yml 和 lang.yml。
? 用例
仅发送消息的命令(Discord 链接)
commands:
discord:
enabled: true
description: "显示 Discord 邀请链接。"
permission-mode: EVERYONE
execute-as: PLAYER
commands: []
message: "&b我们的 Discord: &fhttps://discord.gg/yourserver"
多命令启动包(每天一次)
commands:
starterkit:
enabled: true
permission-mode: PERMISSION
permission: simplecommands.cmd.starterkit
cooldown: 86400
execute-as: CONSOLE
commands:
- "give {player} bread 16"
- "give {player} iron_sword 1"
message: "&a你已收到新手礼包!明天再来吧。"
代理服务器切换(Velocity / BungeeCord)
像 /server 这样的代理命令不能作为普通命令条目运行——它们在后端运行,而不是在代理上。请改用 [server](或 [connect])动作标签:
commands:
lobby:
enabled: true
permission-mode: EVERYONE
execute-as: PLAYER
aliases: [ hub ]
commands:
- "[server] lobby"
message: "&b正在将你传送到大厅..."
代理端要求:
- Velocity:
velocity.toml → bungee-plugin-message-channel = true(默认值)
- Paper 后端:
spigot.yml → settings.bungeecord: true
限时活动命令
commands:
event:
enabled: true
permission-mode: EVERYONE
execute-as: CONSOLE
available-from: "2026-12-24 00:00"
available-until: "2026-12-26 23:59"
commands:
- "give {player} firework_rocket 8"
message: "&a节日快乐!"
带延迟、冻结和音效的传送
commands:
spawn:
enabled: true
permission-mode: EVERYONE
execute-as: CONSOLE
sound-before: BLOCK_NOTE_BLOCK_PLING
sound-after: ENTITY_ENDERMAN_TELEPORT
delay: 3
delay-message: "&e将在 {time}s 后传送..."
delay-freeze: true
commands:
- "tp {player} 0 78 0"
message: "&a已传送到出生点。"
玩家会听到一声提示音,在动作栏看到“将在 3s 后传送...”,无法移动,3 秒后伴随着末影人的音效被传送。
带命名参数的传送点
commands:
warp:
enabled: true
permission-mode: PERMISSION
permission: simplecommands.cmd.warp
cooldown: 3
execute-as: CONSOLE
commands:
- "msg {player} 用法: /warp <spawn|shop|nether>"
message: ""
args:
spawn:
- "tp {player} 0 78 0"
shop:
- "tp {player} -200 78 512"
nether:
- "tp {player} 0 78 0 world_nether"
/warp spawn → 传送到出生点
/warp shop → 传送到商店
/warp → 显示用法提示
- Tab 补全建议:
spawn、shop、nether
? 故障排除
插件无法加载
检查:
- 你是否在使用 Paper 1.20+?(
/version)
- JAR 文件是否在
plugins/ 文件夹中?
- 你是否安装了 Java 21?(
java -version)
找不到自定义命令
检查:
- 插件是否已加载?(在控制台中查找 "[SimpleCommands]")
- 命令是否设置了
enabled: true?
- 编辑
commands.yml 后是否运行了 /sc reload?
“你没有权限”
检查:
- 命令的
permission-mode 和 permission 节点
- 授予该节点(例如通过 LuckPerms)
- 对于
OP 模式,玩家必须是管理员
命令执行但无反应
检查:
execute-as —— 对于玩家自己无法执行的操作,请使用 CONSOLE
commands: 列表中的命令没有前导 /
- 占位符拼写正确(
{player},而非 %player%)
/server(代理)提示“未知命令”
代理命令无法在后端运行。请改用动作标签代替普通命令:
- 在
commands: 列表中写入 "[server] lobby"(而不是 "server lobby")
- Velocity:
velocity.toml → bungee-plugin-message-channel = true
- Paper 后端:
spigot.yml → settings.bungeecord: true
注意:冷却时间按后端服务器存储,不跨整个网络共享。
? 性能
SimpleCommands 轻量高效,旨在提供流畅的性能:
- ✅ 命令直接注册到服务器的
CommandMap
- ✅ 异步保存冷却时间(退出时无主线程文件 I/O)
- ✅ 检测并中止递归命令(防止无限循环/崩溃)
- ✅ 无外部依赖(LuckPerms 为可选软依赖)
- ✅ 单个 JAR 兼容 1.20.x–1.21.x
- ✅ 主线程安全执行
? 版本历史
未来路线图
- PlaceholderAPI 集成
- 用于命令的游戏内 GUI 编辑器
- 周期性冷却自动保存
- 按命令的使用统计
1.0.3
- 命名参数:通过
args 映射,在单个命令条目中定义 /warp spawn、/warp shop 等。
- 参数名的 Tab 补全。
- 游戏内编辑:使用
/sc edit <cmd> addarg <name> <command> 和 removearg <name>。
- 当输入未知参数时,向玩家显示可用选项。
1.0.2
- 音效功能:支持
sound-before 和 sound-after,并安全处理无效的音效名称。
- 延迟系统:动作栏倒计时显示
{time} 占位符,可选的移动冻结功能(delay-freeze)。
- 命令现在会强制覆盖现有命令(修复与其他插件的
/spawn 冲突问题)。
1.0.1
- 通过
[server] / [connect] 动作标签实现代理服务器切换(适用于 Velocity/BungeeCord)。
- 无限循环保护:检测递归命令并安全中止。
- 持久化冷却时间:保存至磁盘,玩家登出和服务器重启后依然保留。
1.0.0
- 初始发布:自定义命令、玩家/控制台执行、持久化冷却时间、权限控制(EVERYONE/OP/PERMISSION)、别名、占位符、时间窗口、实时重载、可翻译消息。
? 链接
NOTE: I generated ONLY this description with AI and I'm open for your ideas!
⚡ SimpleCommands
Create your own commands without writing code — for Paper Minecraft 1.20+ servers
SimpleCommands lets server admins define custom commands in a simple config file (or live in‑game). Each custom command runs one or more real commands — as the player or as the console — with cooldowns, permissions, aliases, placeholders, and optional time windows. Players type /spawn, not /sc spawn: commands are registered directly into the server and behave like native ones.
✨ Key Features
?️ Custom Commands Without Code
- Define
/spawn, /discord, /shop and more in YAML or in‑game
- Each command runs a list of real commands in order
- No Java, no recompiling — just edit and
/sc reload
? Run As Player or Console
- PLAYER → runs with the player's own permissions
- CONSOLE → runs with full permissions (teleport, give, etc.)
- Perfect for letting players trigger admin‑only actions safely
⏱️ Persistent Cooldowns
- Per‑command, per‑player cooldowns
- Saved to disk — survive player logout and server restarts
- Bypass permission for staff (
simplecommands.cooldown.bypass)
? Flexible Permissions
EVERYONE → open to all
OP → operators only
PERMISSION → custom node, fully LuckPerms‑compatible
? Placeholders
{player}, {uuid}, {world}, {x}, {y}, {z}
- Extendable architecture — add new placeholders without touching existing code
? Time‑Limited Commands
- Optional
available-from / available-until window
- Great for events, sales, and limited‑time rewards
? Proxy Support (Velocity / BungeeCord)
- Move players between servers with the
[server] <name> action tag
- Works where plain proxy commands (
/server) can't — sent via plugin messaging
? Sound Effects
- Play sounds before and after command execution
- Uses Bukkit sound names (
ENTITY_ENDERMAN_TELEPORT) or namespaced keys (minecraft:entity.player.levelup)
- Invalid sound names are safely skipped — no crash, just a warning in the console
⏳ Delay with Action Bar Countdown
- Optional delay before command execution (e.g. 3 seconds before teleport)
- Action bar countdown — shows remaining time (customizable text with
{time} and {total})
- Freeze mode — optionally block player movement (walking, jumping) during the delay
- Head rotation still allowed, player just can't walk away
? Named Arguments
- Define
/warp spawn, /warp shop, /warp nether with a single command entry
- Each argument maps to its own list of commands
/warp (no argument) runs the default commands list (e.g. usage hint)
- Tab-completion suggests available argument names automatically
- Editable in-game:
/sc edit warp addarg mine tp {player} 100 64 200
?️ Loop‑Safe Execution
- A command that (directly or indirectly) calls itself is detected and aborted
- No
StackOverflowError, no server crash from a misconfigured command
♻️ Live Reload & Translations
/sc reload applies changes without a restart
- Every message lives in
lang.yml — fully translatable
? Installation
- Download
.jar from GitHub or Modrinth
- Place in
plugins/ folder
- Restart server
- Edit
plugins/SimpleCommands/commands.yml (auto-generated)
- Run
/sc reload
Requirements: Paper (or fork) 1.20.x–1.21.x, Java 21. Optional: LuckPerms.
? Player Commands
/spawn # or any command you define in commands.yml
Players simply type the command name you created (and its aliases).
? Admin Commands
/sc create <name> <command...> # Create a new command
/sc delete <name> # Delete a command
/sc edit <name> <field> <value...> # Edit a single field
/sc list # List all commands with status
/sc info <name> # Show full details of a command
/sc reload # Reload config + commands
/simplecommands and /sc are interchangeable.
? Permissions
| Permission |
Default |
Description |
simplecommands.admin |
op |
All admin commands |
simplecommands.admin.create |
op |
/sc create |
simplecommands.admin.delete |
op |
/sc delete |
simplecommands.admin.edit |
op |
/sc edit |
simplecommands.admin.list |
op |
/sc list |
simplecommands.admin.info |
op |
/sc info |
simplecommands.admin.reload |
op |
/sc reload |
simplecommands.cooldown.bypass |
op |
Ignore custom-command cooldowns |
Custom commands using permission-mode: PERMISSION require whatever node you set in their permission field (e.g. simplecommands.cmd.spawn).
Example: LuckPerms
/lp user <player> permission set simplecommands.cmd.spawn true
/lp group admin permission set simplecommands.admin true
⚙️ Configuration
SimpleCommands splits config across focused files:
| File |
Purpose |
config.yml |
General plugin settings |
lang.yml |
All plugin messages (translatable) |
commands.yml |
Your custom command definitions |
cooldowns.yml |
Saved cooldowns (auto-generated) |
Command Definition
commands:
spawn:
enabled: true
description: "Teleport to spawn."
permission-mode: PERMISSION
permission: simplecommands.cmd.spawn
aliases:
- lobby
- hub
cooldown: 5
execute-as: CONSOLE
commands:
- "tp {player} 0 78 0"
message: "&aTeleported to spawn."
Field Reference
| Field |
Description |
enabled |
true/false. Disabled commands stay registered but refuse to run |
description |
Shown in /sc list and /sc info |
permission-mode |
EVERYONE, OP, or PERMISSION |
permission |
Node checked when mode is PERMISSION |
aliases |
Alternate names for the command |
cooldown |
Seconds between uses (0 = none). Saved across restarts |
execute-as |
PLAYER (player's rights) or CONSOLE (full rights) |
commands |
List of commands run in order (no leading /) |
message |
Optional message after execution |
available-from / available-until |
Optional yyyy-MM-dd HH:mm time window |
sound-before |
Sound played before execution (Bukkit name or namespaced key) |
sound-after |
Sound played after execution completes |
delay |
Seconds to wait before running commands (0 = instant) |
delay-message |
Action bar text during countdown ({time} = remaining, {total} = total) |
delay-freeze |
true/false. Block movement during delay |
args |
Named arguments map — each key is an arg name, value is a list of commands |
Placeholders
| Placeholder |
Meaning |
{player} |
Player's name |
{uuid} |
Player's UUID |
{world} |
World name |
{x} {y} {z} |
Block coordinates |
Color Codes
&a &c ... # classic color codes
&#RRGGBB # hex colors (e.g. &#ff8800)
See full commands.yml and lang.yml for all options.
? Use Cases
Message-Only Command (Discord link)
commands:
discord:
enabled: true
description: "Show the Discord invite link."
permission-mode: EVERYONE
execute-as: PLAYER
commands: []
message: "&bOur Discord: &fhttps://discord.gg/yourserver"
Multi-Command Starter Kit (once per day)
commands:
starterkit:
enabled: true
permission-mode: PERMISSION
permission: simplecommands.cmd.starterkit
cooldown: 86400
execute-as: CONSOLE
commands:
- "give {player} bread 16"
- "give {player} iron_sword 1"
message: "&aYou received the starter kit! Come back tomorrow."
Proxy Server Switch (Velocity / BungeeCord)
Proxy commands like /server cannot be run as a normal command entry — they run on
the backend, not the proxy. Use the [server] (or [connect]) action tag instead:
commands:
lobby:
enabled: true
permission-mode: EVERYONE
execute-as: PLAYER
aliases: [ hub ]
commands:
- "[server] lobby"
message: "&bSending you to the lobby..."
Proxy-side requirements:
- Velocity:
velocity.toml → bungee-plugin-message-channel = true (default)
- Paper backend:
spigot.yml → settings.bungeecord: true
Time-Limited Event Command
commands:
event:
enabled: true
permission-mode: EVERYONE
execute-as: CONSOLE
available-from: "2026-12-24 00:00"
available-until: "2026-12-26 23:59"
commands:
- "give {player} firework_rocket 8"
message: "&aHappy holidays!"
Teleport with Delay, Freeze & Sounds
commands:
spawn:
enabled: true
permission-mode: EVERYONE
execute-as: CONSOLE
sound-before: BLOCK_NOTE_BLOCK_PLING
sound-after: ENTITY_ENDERMAN_TELEPORT
delay: 3
delay-message: "&eTeleporting in {time}s..."
delay-freeze: true
commands:
- "tp {player} 0 78 0"
message: "&aTeleported to spawn."
Player hears a pling, sees "Teleporting in 3s..." on the action bar, can't move, and after
3 seconds gets teleported with the enderman sound.
Warp with Named Arguments
commands:
warp:
enabled: true
permission-mode: PERMISSION
permission: simplecommands.cmd.warp
cooldown: 3
execute-as: CONSOLE
commands:
- "msg {player} Usage: /warp <spawn|shop|nether>"
message: ""
args:
spawn:
- "tp {player} 0 78 0"
shop:
- "tp {player} -200 78 512"
nether:
- "tp {player} 0 78 0 world_nether"
/warp spawn → teleports to spawn
/warp shop → teleports to the shop
/warp → shows usage hint
- Tab-completion suggests:
spawn, shop, nether
? Troubleshooting
Plugin won't load
Check:
- Are you using Paper 1.20+? (
/version)
- Is the JAR in the
plugins/ folder?
- Do you have Java 21? (
java -version)
Custom command not found
Check:
- Did the plugin load? (Check console for "[SimpleCommands]")
- Is the command
enabled: true?
- Run
/sc reload after editing commands.yml
"You don't have permission"
Check:
- The command's
permission-mode and permission node
- Grant the node (e.g. via LuckPerms)
- For
OP mode, the player must be an operator
Command runs but does nothing
Check:
execute-as — use CONSOLE for actions players can't run themselves
- The commands in the
commands: list have no leading /
- Placeholders are spelled correctly (
{player}, not %player%)
/server (proxy) says "unknown command"
Proxy commands can't run on the backend. Use the action tag instead of a plain command:
- Write
"[server] lobby" (not "server lobby") in the commands: list
- Velocity:
velocity.toml → bungee-plugin-message-channel = true
- Paper backend:
spigot.yml → settings.bungeecord: true
Note: cooldowns are stored per backend server, not shared across the whole network.
? Performance
SimpleCommands is lightweight and built for clean performance:
- ✅ Commands registered directly into the server's
CommandMap
- ✅ Cooldowns saved asynchronously (no main-thread file I/O on quit)
- ✅ Recursive commands detected and aborted (no infinite loops / crashes)
- ✅ No external dependencies (LuckPerms optional, soft-depend)
- ✅ Single JAR runs across 1.20.x–1.21.x
- ✅ Main-thread safe execution
? Version History
Future Roadmap
- PlaceholderAPI integration
- In-game GUI editor for commands
- Periodic cooldown auto-save
- Per-command usage statistics
1.0.3
- Named arguments: define
/warp spawn, /warp shop etc. in a single command entry via args map.
- Tab-completion for argument names.
- In-game editing:
/sc edit <cmd> addarg <name> <command> and removearg <name>.
- Unknown argument shows available options to the player.
1.0.2
- Sound effects:
sound-before and sound-after with safe handling of invalid sound names.
- Delay system: action bar countdown with
{time} placeholder, optional movement freeze (delay-freeze).
- Commands now forcefully override existing commands (fixes
/spawn conflict with other plugins).
1.0.1
- Proxy server switching via
[server] / [connect] action tags (Velocity/BungeeCord).
- Infinite-loop protection: recursive commands detected and aborted safely.
- Persistent cooldowns: saved to disk, survive player logout and server restarts.
1.0.0
- Initial release: custom commands, player/console execution, persistent cooldowns, permissions (EVERYONE/OP/PERMISSION), aliases, placeholders, time windows, live reload, translatable messages.
? Links
- GitHub:
- Modrinth:
- Issues:
评论 0
登录后参与评分
还没有评论,来抢沙发吧