St3ix Commands 插件 [支持 Folia]
一款功能强大且特性丰富的自定义命令插件,适用于 Paper/Spigot 服务器。具备高级功能,包括嵌套子命令、参数系统、玩家验证、控制台命令执行、可点击链接以及 Folia 支持!
功能特性
自定义命令
- 创建无限数量的自定义命令,支持权限、别名和冷却时间
- 每个命令拥有独立的权限系统
- 支持命令别名(例如,
/dc 对应 /discord)
- 可配置的冷却时间以防止刷屏
- 支持 Folia!
嵌套子命令
- 为任何自定义命令添加带标签补全功能的子命令
- 无限嵌套深度 - 子命令还可以拥有自己的子命令!
- 每个子命令层级拥有独立的权限
- 智能标签补全系统
- 示例:
/admin player kick、/admin server restart
参数系统
- 为命令和子命令添加参数
- 在消息和命令中使用
{args} 变量
- 支持允许参数的白名单
- 可配置必填/可选参数
- 支持包含空格的参数
- 示例:
/say hello、/kick Steve、/teleport Player 100 64 200
*玩家参数 (player-args)
- 将特定参数标记为玩家名称
- 自动验证 - 确保玩家存在且在线
- 智能标签补全 - 自动显示所有在线玩家
- 针对无效玩家的清晰错误提示
- 与嵌套子命令兼容
- 示例:
/kick Steve(验证 Steve 是否在线)
控制台命令执行
- 通过自定义命令执行任何服务器命令
- 选择执行类型:“Console”(以服务器身份)或“Player”(以用户身份)
- 变量替换系统:
{player} - 玩家名称
{displayname} - 玩家显示名称
{world} - 玩家所在世界名称
{x}, {y}, {z} - 玩家坐标
{online_players} - 在线玩家数量
{max_players} - 最大玩家数
{args} - 命令参数
可点击链接
- 支持消息中的可点击链接
- 自定义语法:
(显示文本)[<URL>]
- 在玩家浏览器中打开 URL
- 在主命令和子命令中均有效
现代文本格式化
- 完全集成 Kyori Adventure API
- 支持十六进制颜色代码(
&#FF8800)
- 支持传统颜色代码(
&6、&c 等)
- 支持带有可点击元素的 JSON tellraw 格式
高级功能
- 无需重启服务器即可热重载配置
- 自定义日志系统,支持彩色控制台输出
- 日志文件轮换
- 全面的错误处理
- 异步命令执行
- Folia 服务器支持 (v1.1.0+)
示例命令
带参数的嵌套子命令
admin:
permission: "customcommands.admin"
subcommands:
player:
permission: "customcommands.admin.player"
subcommands: # 嵌套子命令!
kick:
permission: "customcommands.admin.player.kick"
arguments:
player-args: [0] # 第一个参数 = 玩家名称
no-arguments: false
commands:
- "kick {args} Kicked by {player}"
ban:
permission: "customcommands.admin.player.ban"
arguments:
player-args: [0]
no-arguments: false
commands:
- "ban {args} Banned by {player}"
用法:
/admin player kick Steve - 踢出 Steve(验证玩家在线)
/admin player ban Steve - 封禁 Steve(验证玩家在线)
带子命令的 Discord 命令
discord:
permission: "customcommands.discord"
alias: ["dc"]
subcommands:
send:
commands:
- "msg {player} &6Discord: &bhttps://discord.gg/example"
invite:
message:
- "&7点击这里: (加入 Discord)[<https://discord.gg/example>]"
带参数的命令
say:
permission: "customcommands.say"
arguments:
whitelist: ["hello", "goodbye", "help"]
whitelist-only: true
no-arguments: true
commands:
- "say {player}: {args}"
用法:
/say hello - 有效(在白名单中)
/say goodbye - 有效(在白名单中)
/say test - 无效(不在白名单中)
带玩家验证的命令
kick:
permission: "customcommands.kick"
arguments:
player-args: [0] # 第一个参数必须是玩家名称
no-arguments: false
commands:
- "kick {args} Kicked by {player}"
用法:
/kick Steve - 有效(如果 Steve 在线)
/kick InvalidPlayer - 错误:“玩家 InvalidPlayer 不在线或不存在!”
带控制台命令的示例
example:
type: "Console"
commands:
- "say {player} used the example command!"
- "effect give {player} minecraft:glowing 10 1 true"
- "title {player} title [\"\",{\"text\":\"Example!\",\"color\":\"gold\"}]"
安装
- 下载插件 JAR 文件
- 将其放入服务器的
plugins 文件夹
- 重启服务器
- 在
plugins/St3ixCommands/config.yml 中配置命令
- 使用
/customcommands reload 重新加载配置
命令
/st3ixcommands - 主命令
/st3ixcommands reload - 重新加载配置
/st3ixcommands help - 显示帮助
/st3ixcommands support - 显示支持信息
/st3ixcommands version - 显示版本信息
权限
st3ixcommands.* - 所有权限
st3ixcommands.use - 基本使用
st3ixcommands.reload - 重新加载配置
st3ixcommands.commandname - 使用特定命令
st3ixcommands.commandname.subcommand - 使用特定子命令
st3ixcommands.commandname.subcommand.nested - 使用嵌套子命令
配置
插件会生成包含示例和文档的详细配置文件:
config.yml - 包含命令定义的主配置文件
- 包含所有功能的全面文档
- 提供参数、嵌套子命令和 player-args 的示例
messages.yml - 所有插件消息
logs/ - 插件日志文件
需求与兼容性
兼容性评级
- Folia 1.21.x:完全支持(v1.1.0+)
- Paper 1.21.4+:完全支持且经过测试
- Paper 1.21.0-1.21.3**:可能兼容(已在 1.21.2-1.21.3 上测试)
- Paper 1.20.x**:可能兼容(未经测试)
- Paper 1.19.x:可能可用,但存在小问题(未经测试)
不支持
- Spigot - 本插件使用
paper-plugin.yml,需要 Paper 特定的 API
- 自定义 Paper 分支 - 风险自负,不提供技术支持
- PlugMan - 请勿使用 PlugMan 加载此插件(Paper 插件不受支持)
重要说明
- 免责声明:开发者不对自定义 Paper/Folia 分支上的崩溃或问题承担责任
- Paper 与 Folia:本插件专为 Paper 和 Folia 服务器设计(v1.1.0+)
- 禁用 PlugMan:请勿尝试使用 PlugMan 加载此插件(Plugman 本身也不适用于 Paper)
- 备份:安装插件前务必备份服务器
- 测试:在生产环境使用前,请在开发服务器上测试
文档
配置文件包含全面的文档,包括:
- 颜色代码参考
- 变量替换指南
- 控制台命令示例
- 可点击链接语法
- 子命令创建指南
- 参数系统文档
- 嵌套子命令指南
- 玩家参数功能说明
适用场景
- 希望拥有高级功能的自定义命令的服务器所有者
- 需要控制台命令集成的服务器
- 希望使用现代文本格式的社区
- 需要灵活命令系统的管理员
- 需要在命令中进行玩家验证的服务器
- 具有嵌套子命令的复杂命令结构
St3ix Commands Plugin [Folia Support]
A powerful and feature-rich custom commands plugin for Paper/Spigot servers with advanced functionality including nested subcommands, arguments system, player validation, console command execution, clickable links, and Folia Support!
Features
Custom Commands
- Create unlimited custom commands with permissions, aliases, and cooldowns
- Individual permission system for each command
- Support for command aliases (e.g.,
/dc for /discord)
- Configurable cooldowns to prevent spam
- Folia Supported!
Nested Subcommands
- Add tab-completed subcommands to any custom command
- Unlimited nesting depth - subcommands can have their own subcommands!
- Individual permissions for each subcommand level
- Smart tab completion system
- Example:
/admin player kick, /admin server restart
Arguments System
- Add arguments to commands and subcommands
- Use
{args} variable in messages and commands
- Whitelist support for allowed arguments
- Required/optional argument configuration
- Support for arguments with spaces
- Example:
/say hello, /kick Steve, /teleport Player 100 64 200
*Player Arguments (player-args)
- Mark specific arguments as player names
- Automatic validation - ensures players exist and are online
- Smart tab-completion - shows all online players automatically
- Clear error messages for invalid players
- Works with nested subcommands
- Example:
/kick Steve (validates Steve is online)
Console Command Execution
- Execute any server command through custom commands
- Choose execution type: "Console" (as server) or "Player" (as user)
- Variable replacement system:
{player} - Player name
{displayname} - Player display name
{world} - Player's world name
{x}, {y}, {z} - Player coordinates
{online_players} - Number of online players
{max_players} - Maximum players
{args} - Command arguments
Clickable Links
- Support for clickable links in messages
- Custom syntax:
(Display Text)[<URL>]
- Opens URLs in player's browser
- Works in both main commands and subcommands
Modern Text Formatting
- Full Kyori Adventure API integration
- Support for hex colors (
&#FF8800)
- Legacy color codes (
&6, &c, etc.)
- JSON tellraw support with clickable elements
Advanced Features
- Hot-reload configuration without server restart
- Custom logging system with colored console output
- File rotation for log files
- Comprehensive error handling
- Asynchronous command execution
- Folia server support (v1.1.0+)
Example Commands
Nested Subcommands with Arguments
admin:
permission: "customcommands.admin"
subcommands:
player:
permission: "customcommands.admin.player"
subcommands: # Nested subcommands!
kick:
permission: "customcommands.admin.player.kick"
arguments:
player-args: [0] # First argument = player name
no-arguments: false
commands:
- "kick {args} Kicked by {player}"
ban:
permission: "customcommands.admin.player.ban"
arguments:
player-args: [0]
no-arguments: false
commands:
- "ban {args} Banned by {player}"
Usage:
/admin player kick Steve - Kicks Steve (validates player is online)
/admin player ban Steve - Bans Steve (validates player is online)
Discord Command with Subcommands
discord:
permission: "customcommands.discord"
alias: ["dc"]
subcommands:
send:
commands:
- "msg {player} &6Discord: &bhttps://discord.gg/example"
invite:
message:
- "&7Click here: (Join Discord)[<https://discord.gg/example>]"
Command with Arguments
say:
permission: "customcommands.say"
arguments:
whitelist: ["hello", "goodbye", "help"]
whitelist-only: true
no-arguments: true
commands:
- "say {player}: {args}"
Usage:
/say hello - Valid (in whitelist)
/say goodbye - Valid (in whitelist)
/say test - Invalid (not in whitelist)
Command with Player Validation
kick:
permission: "customcommands.kick"
arguments:
player-args: [0] # First argument must be a player name
no-arguments: false
commands:
- "kick {args} Kicked by {player}"
Usage:
/kick Steve - Valid (if Steve is online)
/kick InvalidPlayer - Error: "Player InvalidPlayer is not online or does not exist!"
Example Command with Console Commands
example:
type: "Console"
commands:
- "say {player} used the example command!"
- "effect give {player} minecraft:glowing 10 1 true"
- "title {player} title [\"\",{\"text\":\"Example!\",\"color\":\"gold\"}]"
Installation
- Download the plugin JAR file
- Place it in your server's
plugins folder
- Restart your server
- Configure commands in
plugins/St3ixCommands/config.yml
- Use
/customcommands reload to reload configuration
Commands
/st3ixcommands - Main command
/st3ixcommands reload - Reload configuration
/st3ixcommands help - Show help
/st3ixcommands support - Show support information
/st3ixcommands version - Show version info
Permissions
st3ixcommands.* - All permissions
st3ixcommands.use - Basic usage
st3ixcommands.reload - Reload configuration
st3ixcommands.commandname - Use specific command
st3ixcommands.commandname.subcommand - Use specific subcommand
st3ixcommands.commandname.subcommand.nested - Use nested subcommand
Configuration
The plugin creates detailed configuration files with examples and documentation:
config.yml - Main configuration with command definitions
- Includes comprehensive documentation for all features
- Examples for arguments, nested subcommands, and player-args
messages.yml - All plugin messages
logs/ - Plugin log files
Requirements & Compatibility
Compatibility Rating
- Folia 1.21.x: Fully supported (v1.1.0+)
- Paper 1.21.4+: Fully supported and tested
- Paper 1.21.0-1.21.3**: Likely compatible (tested on 1.21.2-1.21.3)
- Paper 1.20.x**: Probably compatible (not tested)
- Paper 1.19.x: May work with minor issues (not tested)
Not Supported
- Spigot - This plugin uses
paper-plugin.yml and requires Paper-specific APIs
- Custom Paper Forks - Use at your own risk, no support provided
- PlugMan - Do not use PlugMan to load this plugin (Paper plugins not supported)
Important Notes
- No Liability: The developer takes no responsibility for crashes or issues on custom Paper/Folia forks
- Paper & Folia: This plugin is designed for Paper and Folia servers (v1.1.0+)
- No PlugMan: Do not attempt to load this plugin with PlugMan (Plugman does not work on paper anyways)
- Backup: Always backup your server before installing plugins
- Testing: Test on a development server before using in production
Documentation
The configuration files include comprehensive documentation with:
- Color code reference
- Variable replacement guide
- Console command examples
- Clickable link syntax
- Subcommand creation guide
- Arguments system documentation
- Nested subcommands guide
- Player-args feature explanation
Perfect For
- Server owners wanting custom commands with advanced features
- Servers needing console command integration
- Communities wanting modern text formatting
- Administrators needing flexible command systems
- Servers requiring player validation in commands
- Complex command structures with nested subcommands
评论 0
登录后参与评分
还没有评论,来抢沙发吧