? BubbleCommand v2.0
专为懒人服务器管理员打造的终极自定义命令插件!?
无需任何编程知识,几分钟即可创建强大的自定义命令!
? 概述
BubbleCommand 是一款功能强大却又极其简单的 Spigot/Paper/Purpur 插件,让你仅通过配置文件即可创建自定义命令。非常适合希望在不编写一行代码的情况下为服务器添加自定义功能的服务器管理员!
✨ 为什么选择 BubbleCommand?
- ? 无需编程 - 所有操作均通过简单的配置文件完成
- ? 超级易用 - 复制、粘贴、编辑。搞定!
- ? 生产就绪 - 经过全面错误处理的实战考验
- ? 功能丰富 - 冷却时间、多动作、权限、占位符等
- ? 文档完善 - 配置文件中包含大量示例
- ? 高度灵活 - 创造你能想到的任何命令
- ⚡ 性能优化 - 对服务器的影响极小
- ? 现代设计 - 带有颜色代码和标题的美观消息
? 特性
核心特性
- ✅ 自定义命令 - 创建无限数量的自定义命令
- ✅ 命令别名 - 为任意命令添加多个别名
- ✅ 多动作支持 - 每个命令可执行多个动作
- ✅ 权限系统 - 控制谁可以使用每个命令
- ✅ 冷却系统 - 通过每命令冷却防止命令滥用
- ✅ 仅限玩家选项 - 限制命令仅供玩家使用
- ✅ 控制台命令 - 以控制台权限运行命令
- ✅ 热重载 - 无需重启服务器即可重载配置
动作类型
- ? 控制台命令 - 以控制台身份执行命令
- ? 玩家命令 - 以玩家身份执行命令
- ? 消息 - 向玩家发送彩色消息
- ? 广播 - 向所有在线玩家广播消息
- ? 声音 - 向玩家播放声音
- ? 标题 - 显示标题和副标题
- ? 状态栏 - 显示状态栏消息
占位符
%player% - 玩家名称
%displayname% - 玩家的显示名称
%uuid% - 玩家的 UUID
%world% - 玩家当前所在的世界
%x%, %y%, %z% - 玩家的坐标
%health% - 玩家的生命值
%food% - 玩家的饥饿值
%level% - 玩家的等级
%exp% - 玩家的经验值
%gamemode% - 玩家的游戏模式
%sender% - 命令发送者的名称
%arg0%, %arg1%, 等 - 命令参数
%args% - 所有参数连接在一起
? 安装
要求
- Minecraft 服务器:1.19+(Spigot, Paper, Purpur 或任何分支)
- Java:17 或更高版本
步骤
-
下载 最新的 BubbleCommand-x.x.x.jar
-
放置 JAR 文件到服务器的 plugins 文件夹中
-
重启 你的服务器
-
配置 位于 plugins/BubbleCommand/config.yml 中的自定义命令
-
重载 使用 /bubblecommand reload(或重启)
就这么简单!?
? 快速开始
给超级懒人(30秒设置)
- 打开
plugins/BubbleCommand/config.yml
- 找到
heal: 命令示例
- 删除每行开头的
# 以取消注释
- 在游戏中运行
/bubblecommand reload
- 使用
/heal 命令!
给稍微不那么懒的人(2分钟设置)
复制此模板并添加到你的配置中:
custom-commands:
mycommand:
aliases: [mc]
description: "My awesome command"
permission: "bubblecommand.mycommand"
player-only: true
cooldown: 60
actions:
- "message: &aHello, %player%!"
- "sound: ENTITY_PLAYER_LEVELUP"
然后:
- 将
mycommand 改为你想要的名称
- 编辑消息
- 保存并运行
/bubblecommand reload
- 使用你的命令!
? 文档
基本命令结构
custom-commands:
commandname: # 命令名称(使用小写)
aliases: [alias1, alias2] # 可选的命令别名
description: "Description" # 命令描述
permission: "perm.node" # 可选的权限节点
player-only: true # true = 仅限玩家,false = 任何人都可以
cooldown: 60 # 冷却时间(秒)(0 = 无冷却)
actions: # 要执行的动作列表
- "action1"
- "action2"
动作类型详解
1. 控制台命令
以控制台权限运行命令(绕过权限检查):
actions:
- "console: give %player% diamond 64"
- "console: tp %player% 0 100 0"
2. 玩家命令
以玩家身份运行命令(尊重权限):
actions:
- "player: warp spawn"
- "player: home"
3. 消息
向玩家发送彩色消息:
actions:
- "message: &a&lSUCCESS! &7You did it!"
- "message: &cError: Invalid command!"
4. 广播
向所有在线玩家广播:
actions:
- "broadcast: &6[Server] &e%player% &7just did something cool!"
5. 声音
向玩家播放声音:
actions:
- "sound: ENTITY_PLAYER_LEVELUP"
- "sound: BLOCK_NOTE_BLOCK_PLING"
- "sound: UI_TOAST_CHALLENGE_COMPLETE"
6. 标题
显示标题和副标题:
actions:
- "title: &6Welcome!|&eEnjoy your stay|10|70|20"
# 格式:标题|副标题|淡入|停留|淡出(单位为刻)
7. 状态栏
显示状态栏消息:
actions:
- "actionbar: &eYou received a reward!"
实际案例
案例 1:治疗命令
heal:
aliases: [h]
description: "Heal yourself to full health"
permission: "bubblecommand.heal"
player-only: true
cooldown: 60
actions:
- "console: effect give %player% minecraft:instant_health 1 10"
- "console: effect give %player% minecraft:saturation 1 10"
- "message: &a&lHEALED! &7You have been healed to full health!"
- "sound: ENTITY_PLAYER_LEVELUP"
示例 2:新手包
starterkit:
aliases: [kit, starter]
description: "获取新手包"
permission: "bubblecommand.kit.starter"
player-only: true
cooldown: 86400 # 24 小时
actions:
- "console: give %player% minecraft:iron_sword 1"
- "console: give %player% minecraft:iron_pickaxe 1"
- "console: give %player% minecraft:cooked_beef 32"
- "message: &e&l新手包!&7您已收到您的初始物品!"
- "title: &6欢迎!|&e享受您的礼包|10|40|10"
- "sound: ENTITY_PLAYER_LEVELUP"
示例 3:举报命令
report:
aliases: []
description: "举报一名玩家"
permission: "bubblecommand.report"
player-only: true
cooldown: 300 # 5 分钟
actions:
- "console: execute as @a[permission=bubblecommand.staff] run tellraw @s {\"text\":\"[REPORT] %player% reported: %args%\",\"color\":\"red\"}"
- "message: &c&l举报已发送!&7感谢您的举报。"
- "sound: BLOCK_NOTE_BLOCK_PLING"
示例 4:广播命令
announce:
aliases: [broadcast, bc]
description: "广播一条消息"
permission: "bubblecommand.broadcast"
player-only: false
actions:
- "broadcast: &6&l[公告] &e%args%"
- "sound: BLOCK_NOTE_BLOCK_PLING"
颜色代码
在消息中使用 & 来表示颜色代码:
| 代码 |
颜色 |
代码 |
格式 |
&0 |
黑色 |
&l |
粗体 |
&1 |
深蓝色 |
&m |
删除线 |
&2 |
深绿色 |
&n |
下划线 |
&3 |
深青色 |
&o |
斜体 |
&4 |
深红色 |
&r |
重置 |
&5 |
深紫色 |
|
|
&6 |
金色 |
|
|
&7 |
灰色 |
|
|
&8 |
深灰色 |
|
|
&9 |
蓝色 |
|
|
&a |
绿色 |
|
|
&b |
青色 |
|
|
&c |
红色 |
|
|
&d |
浅紫色 |
|
|
&e |
黄色 |
|
|
&f |
白色 |
|
|
? 命令与权限
主要命令
| 命令 |
描述 |
权限 |
/bubblecommand |
显示插件信息 |
- |
/bubblecommand reload |
重新加载配置 |
bubblecommand.admin |
/bcommand |
bubblecommand 的别名 |
- |
/bc |
bubblecommand 的别名 |
- |
权限
| 权限 |
描述 |
默认值 |
bubblecommand.* |
所有权限 |
op |
bubblecommand.admin |
管理员命令 (重载) |
op |
bubblecommand.use |
基本命令使用 |
true |
自定义命令使用其在配置中定义的各自权限。
⚙️ 配置
常规设置
settings:
debug: false # 在控制台中启用调试消息
default-permission: "" # 所有命令的默认权限
save-data: true # 保存玩家数据 (冷却时间)
cooldown-message: "&c您必须等待 %time% 秒后才能再次使用此命令!"
no-permission-message: "&c您没有权限使用此命令!"
player-only-message: "&c此命令只能由玩家使用!"
? 高级功能
多重动作
按顺序执行多个动作:
actions:
- "message: &e开始传送..."
- "sound: BLOCK_NOTE_BLOCK_PLING"
- "console: tp %player% 0 100 0"
- "message: &a传送成功!"
命令参数
在命令中使用参数:
givemoney:
actions:
- "console: eco give %arg0% %arg1%"
- "message: &a已向 &e%arg0% &a发放 &e$%arg1%"
# 用法: /givemoney PlayerName 1000
条件执行
使用玩家占位符进行动态命令:
hometp:
actions:
- "player: home %arg0%"
- "message: &a正在传送到 %arg0% 的家..."
? 性能
BubbleCommand 专为生产环境设计:
- ✅ 异步冷却保存 - 无服务器卡顿
- ✅ 并发哈希表 - 线程安全的冷却时间
- ✅ 极小的内存占用 - 仅存储活动的冷却时间
- ✅ 高效的命令注册 - 智能动态注册
- ✅ 优化的占位符替换 - 快速文本处理
? 故障排除
常见问题
Q: 我的命令不起作用!
- 确保您已移除
# 以取消注释该命令
- 检查 YAML 缩进是否正确(使用空格,不要使用制表符)
- 验证命令名称是否与现有命令冲突
- 修改后运行
/bubblecommand reload
Q: 冷却时间不起作用!
- 确保设置中
save-data: true
- 检查
data.yml 的文件权限
- 冷却时间仅适用于玩家,不适用于控制台
Q: 颜色不显示!
- 使用
& 而不是 § 作为颜色代码
- 如果文本包含特殊字符,请确保将其放在引号内
Q: 命令提示“未知命令”!
- 编辑配置后运行
/bubblecommand reload
- 检查控制台中重载期间的错误
- 验证 YAML 语法是否正确(使用在线 YAML 验证器)
? 技巧与窍门
最佳实践
- 测试命令 再提供给玩家使用
- 使用冷却时间 防止垃圾信息
- 添加权限 以控制访问
- 使用描述性名称 便于管理
- 在配置中添加注释 以便记住命令的作用
- 重大更改前备份配置
进阶技巧
- 对于需要管理员权限的命令,使用
console:
- 链接多个动作用于复杂命令
- 使用声音以获得更好的用户反馈
- 将标题与消息结合用于重要通知
- 使用占位符使命令动态化
- 根据命令强度设置适当的冷却时间
? 许可证
BubbleCommand 根据 MIT 许可证授权。
? BubbleCommand v2.0
The Ultimate Custom Command Plugin for Lazy Server Owners! ?
Create powerful custom commands in minutes with zero coding knowledge!
? Overview
BubbleCommand is a powerful yet incredibly simple Spigot/Paper/Purpur plugin that lets you create custom commands using just a config file. Perfect for server owners who want to add custom functionality without writing a single line of code!
✨ Why BubbleCommand?
- ? Zero Coding Required - Everything is done through a simple config file
- ? Super Easy to Use - Copy, paste, edit. Done!
- ? Production Ready - Battle-tested with comprehensive error handling
- ? Feature Rich - Cooldowns, multi-actions, permissions, placeholders, and more
- ? Well Documented - Tons of examples included in the config
- ? Highly Flexible - Create any command you can imagine
- ⚡ Performance Optimized - Minimal server impact
- ? Modern Design - Beautiful messages with color codes and titles
? Features
Core Features
- ✅ Custom Commands - Create unlimited custom commands
- ✅ Command Aliases - Add multiple aliases to any command
- ✅ Multi-Action Support - Execute multiple actions per command
- ✅ Permission System - Control who can use each command
- ✅ Cooldown System - Prevent command spam with per-command cooldowns
- ✅ Player-Only Option - Restrict commands to players only
- ✅ Console Commands - Run commands with console permissions
- ✅ Hot Reload - Reload config without restarting the server
Action Types
- ? Console Commands - Execute commands as console
- ? Player Commands - Execute commands as player
- ? Messages - Send colored messages to players
- ? Broadcasts - Broadcast messages to all online players
- ? Sounds - Play sounds to players
- ? Titles - Display titles and subtitles
- ? Actionbar - Show actionbar messages
Placeholders
%player% - Player's name
%displayname% - Player's display name
%uuid% - Player's UUID
%world% - Player's current world
%x%, %y%, %z% - Player's coordinates
%health% - Player's health
%food% - Player's food level
%level% - Player's level
%exp% - Player's experience
%gamemode% - Player's gamemode
%sender% - Command sender's name
%arg0%, %arg1%, etc. - Command arguments
%args% - All arguments joined
? Installation
Requirements
- Minecraft Server: 1.19+ (Spigot, Paper, Purpur, or any fork)
- Java: 17 or higher
Steps
-
Download the latest BubbleCommand-x.x.x.jar
-
Place the JAR file in your server's plugins folder
-
Restart your server
-
Configure your custom commands in plugins/BubbleCommand/config.yml
-
Reload with /bubblecommand reload (or restart)
That's it! ?
? Quick Start
For the SUPER Lazy (30 seconds setup)
- Open
plugins/BubbleCommand/config.yml
- Find the
heal: command example
- Remove the
# at the start of each line to uncomment it
- Run
/bubblecommand reload in-game
- Use
/heal command!
For the Slightly Less Lazy (2 minutes setup)
Copy this template and add it to your config:
custom-commands:
mycommand:
aliases: [mc]
description: "My awesome command"
permission: "bubblecommand.mycommand"
player-only: true
cooldown: 60
actions:
- "message: &aHello, %player%!"
- "sound: ENTITY_PLAYER_LEVELUP"
Then:
- Change
mycommand to whatever you want
- Edit the message
- Save and run
/bubblecommand reload
- Use your command!
? Documentation
Basic Command Structure
custom-commands:
commandname: # The command name (use lowercase)
aliases: [alias1, alias2] # Optional command aliases
description: "Description" # Command description
permission: "perm.node" # Optional permission
player-only: true # true = players only, false = anyone
cooldown: 60 # Cooldown in seconds (0 = no cooldown)
actions: # List of actions to execute
- "action1"
- "action2"
Action Types Explained
1. Console Commands
Run commands with console permissions (bypasses permission checks):
actions:
- "console: give %player% diamond 64"
- "console: tp %player% 0 100 0"
2. Player Commands
Run commands as the player (respects permissions):
actions:
- "player: warp spawn"
- "player: home"
3. Messages
Send colored messages to the player:
actions:
- "message: &a&lSUCCESS! &7You did it!"
- "message: &cError: Invalid command!"
4. Broadcasts
Broadcast to all online players:
actions:
- "broadcast: &6[Server] &e%player% &7just did something cool!"
5. Sounds
Play sounds to the player:
actions:
- "sound: ENTITY_PLAYER_LEVELUP"
- "sound: BLOCK_NOTE_BLOCK_PLING"
- "sound: UI_TOAST_CHALLENGE_COMPLETE"
6. Titles
Display title and subtitle:
actions:
- "title: &6Welcome!|&eEnjoy your stay|10|70|20"
# Format: title|subtitle|fadeIn|stay|fadeOut (times in ticks)
7. Actionbar
Show actionbar message:
actions:
- "actionbar: &eYou received a reward!"
Real-World Examples
Example 1: Heal Command
heal:
aliases: [h]
description: "Heal yourself to full health"
permission: "bubblecommand.heal"
player-only: true
cooldown: 60
actions:
- "console: effect give %player% minecraft:instant_health 1 10"
- "console: effect give %player% minecraft:saturation 1 10"
- "message: &a&lHEALED! &7You have been healed to full health!"
- "sound: ENTITY_PLAYER_LEVELUP"
Example 2: Starter Kit
starterkit:
aliases: [kit, starter]
description: "Get a starter kit"
permission: "bubblecommand.kit.starter"
player-only: true
cooldown: 86400 # 24 hours
actions:
- "console: give %player% minecraft:iron_sword 1"
- "console: give %player% minecraft:iron_pickaxe 1"
- "console: give %player% minecraft:cooked_beef 32"
- "message: &e&lSTARTER KIT! &7You received your starter items!"
- "title: &6Welcome!|&eEnjoy your kit|10|40|10"
- "sound: ENTITY_PLAYER_LEVELUP"
Example 3: Report Command
report:
aliases: []
description: "Report a player"
permission: "bubblecommand.report"
player-only: true
cooldown: 300 # 5 minutes
actions:
- "console: execute as @a[permission=bubblecommand.staff] run tellraw @s {\"text\":\"[REPORT] %player% reported: %args%\",\"color\":\"red\"}"
- "message: &c&lREPORT SENT! &7Thank you for reporting."
- "sound: BLOCK_NOTE_BLOCK_PLING"
Example 4: Broadcast Command
announce:
aliases: [broadcast, bc]
description: "Broadcast a message"
permission: "bubblecommand.broadcast"
player-only: false
actions:
- "broadcast: &6&l[ANNOUNCEMENT] &e%args%"
- "sound: BLOCK_NOTE_BLOCK_PLING"
Color Codes
Use & for color codes in messages:
| Code |
Color |
Code |
Format |
&0 |
Black |
&l |
Bold |
&1 |
Dark Blue |
&m |
Strikethrough |
&2 |
Dark Green |
&n |
Underline |
&3 |
Dark Aqua |
&o |
Italic |
&4 |
Dark Red |
&r |
Reset |
&5 |
Dark Purple |
|
|
&6 |
Gold |
|
|
&7 |
Gray |
|
|
&8 |
Dark Gray |
|
|
&9 |
Blue |
|
|
&a |
Green |
|
|
&b |
Aqua |
|
|
&c |
Red |
|
|
&d |
Light Purple |
|
|
&e |
Yellow |
|
|
&f |
White |
|
|
? Commands & Permissions
Main Commands
| Command |
Description |
Permission |
/bubblecommand |
Show plugin information |
- |
/bubblecommand reload |
Reload configuration |
bubblecommand.admin |
/bcommand |
Alias for bubblecommand |
- |
/bc |
Alias for bubblecommand |
- |
Permissions
| Permission |
Description |
Default |
bubblecommand.* |
All permissions |
op |
bubblecommand.admin |
Admin commands (reload) |
op |
bubblecommand.use |
Basic command usage |
true |
Custom commands use their own permissions as defined in config.
⚙️ Configuration
General Settings
settings:
debug: false # Enable debug messages in console
default-permission: "" # Default permission for all commands
save-data: true # Save player data (cooldowns)
cooldown-message: "&cYou must wait %time% seconds before using this command again!"
no-permission-message: "&cYou don't have permission to use this command!"
player-only-message: "&cThis command can only be used by players!"
? Advanced Features
Multiple Actions
Execute multiple actions in sequence:
actions:
- "message: &eStarting teleport..."
- "sound: BLOCK_NOTE_BLOCK_PLING"
- "console: tp %player% 0 100 0"
- "message: &aTeleported!"
Command Arguments
Use arguments in your commands:
givemoney:
actions:
- "console: eco give %arg0% %arg1%"
- "message: &aGave &e$%arg1% &ato &e%arg0%"
# Usage: /givemoney PlayerName 1000
Conditional Execution
Use player placeholders for dynamic commands:
hometp:
actions:
- "player: home %arg0%"
- "message: &aTeleporting to %arg0%'s home..."
? Performance
BubbleCommand is designed for production environments:
- ✅ Async cooldown saves - No server lag
- ✅ Concurrent hashmap - Thread-safe cooldowns
- ✅ Minimal memory footprint - Only stores active cooldowns
- ✅ Efficient command registration - Smart dynamic registration
- ✅ Optimized placeholder replacement - Fast text processing
? Troubleshooting
Common Issues
Q: My command doesn't work!
- Make sure you removed the
# to uncomment the command
- Check for proper YAML indentation (use spaces, not tabs)
- Verify the command name doesn't conflict with existing commands
- Run
/bubblecommand reload after making changes
Q: Cooldown isn't working!
- Ensure
save-data: true in settings
- Check file permissions on
data.yml
- Cooldown only applies to players, not console
Q: Colors aren't showing!
- Use
& not § for color codes
- Make sure the text is in quotes if it contains special characters
Q: Command says "Unknown command"!
- Run
/bubblecommand reload after editing config
- Check console for errors during reload
- Verify YAML syntax is correct (use online YAML validator)
? Tips & Tricks
Best Practices
- Test commands before giving them to players
- Use cooldowns to prevent spam
- Add permissions to control access
- Use descriptive names for easy management
- Comment your config to remember what commands do
- Backup your config before major changes
Pro Tips
- Use
console: for commands that need admin permissions
- Chain multiple actions for complex commands
- Use sounds for better user feedback
- Combine titles with messages for important notifications
- Use placeholders to make commands dynamic
- Set appropriate cooldowns based on command power
? License
BubbleCommand is licensed under the MIT License.
Made with ❤️ for the Minecraft community
评论 0
登录后参与评分
还没有评论,来抢沙发吧