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.,
/dcfor/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
pluginsfolder - Restart your server
- Configure commands in
plugins/St3ixCommands/config.yml - Use
/customcommands reloadto 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 permissionsst3ixcommands.use- Basic usagest3ixcommands.reload- Reload configurationst3ixcommands.commandname- Use specific commandst3ixcommands.commandname.subcommand- Use specific subcommandst3ixcommands.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 messageslogs/- 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.ymland 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
All Versions
+ Add Version## 🐛 Bug Fix: Player-Type Commands on Folia
Fixed the error when using **type: "Player"** commands on Folia servers.
### 🔧 What Was Fixed
- Folia "Thread failed main thread check: Dispatching command async"**
- Error**:
Thread failed main thread check: Dispatching command asyncwhen players used commands withtype: "Player" - Issue**: Player-type commands were scheduled on the global region; Folia requires them to run on the **entity's region**
- Fix**: Player-type commands now use **EntityScheduler** (player's region); console-type commands still use **GlobalRegionScheduler**
- Impact**: Only affected **Folia** servers using **type: "Player"** in custom commands
### ✅ What This Means
- ✅ Player-type commands (e.g.
/pomoc,/home) now work on Folia - ✅ Console-type commands unchanged and still work
- ✅ No config changes needed
### 📦 Installation
Update to v1.1.4 – existing configs work as before.
- Full Changelog:**
- Fixed "Dispatching command async" when executing player-type commands on Folia
- Use EntityScheduler for type: "Player", GlobalRegionScheduler for type: "Console" on Folia
## 🐛 Bug Fixes: Folia Command Execution & Command Registration
Fixed two critical bugs that were preventing commands from working properly!
### 🔧 What Was Fixed
- 1. Folia Command Execution Error**
- Error**:
NoSuchMethodException: io.papermc.paper.threadedregions.scheduler.GlobalRegionScheduler.get(org.bukkit.plugin.Plugin) - Issue**: Commands failed to execute on Folia 1.21.11 servers due to incorrect API method usage
- Fix**: Updated to use the correct Folia API:
Bukkit.getServer().getGlobalRegionScheduler().run(Plugin, Consumer<ScheduledTask>) - Impact**: This bug **only affected Folia 1.21.11+ servers** - Paper servers were not affected
- 2. Command Registration Failure**
- Issue**: Custom commands weren't registering at all - commands like
/discordor/websitedid nothing - Symptoms**: No errors in console, but commands simply didn't work
- Fix**:
- Fixed command registration logic to properly handle aliases
- Improved command cleanup before registration (prevents conflicts)
- Added better debug logging to track registration issues
- Impact**: This bug affected **all server types** - Paper and Folia
### ✅ What This Means
- ✅ Commands now execute correctly on Folia servers
- ✅ Commands now properly register and work as expected
- ✅ Better error handling and debug logging for troubleshooting
- ✅ No changes needed to your configuration
- ✅ All existing features work as expected
### 📦 Installation
Simply update to v1.1.3 - your configs work exactly as before!
- Full Changelog:**
- Fixed
NoSuchMethodExceptionwhen executing commands on Folia 1.21.11+ servers - Updated Folia API usage to
Bukkit.getServer().getGlobalRegionScheduler().run(Plugin, Consumer<ScheduledTask>) - Fixed command registration failure - commands now properly register
- Improved alias handling - commands work correctly with aliases
- Added better debug logging for command registration
- Improved command cleanup before registration to prevent conflicts
- Enhanced error messages for better debugging
- Need help?** Join our Discord
## 🐛 Bug Fix: Folia Command Execution
Fixed a critical bug that prevented commands from executing on Folia servers!
### 🔧 What Was Fixed
- Folia Command Execution Error**
- Error**:
NoSuchMethodException: io.papermc.paper.threadedregions.scheduler.GlobalRegionScheduler.getScheduler() - Issue**: Commands failed to execute on Folia servers due to incorrect API usage
- Fix**: Updated to use the correct Folia API:
GlobalRegionScheduler.get(plugin).run(Runnable) - Impact**: This bug **only affected Folia servers** - Paper servers were not affected
### ✅ What This Means
- ✅ Commands now execute correctly on Folia servers
- ✅ No changes needed to your configuration
- ✅ All existing features work as expected
- ✅ Improved error handling for better debugging
### 📦 Installation
Simply update to v1.1.2 - your configs work exactly as before!
- Full Changelog:**
- Fixed
NoSuchMethodExceptionwhen executing commands on Folia servers - Updated Folia API usage to
GlobalRegionScheduler.get(plugin).run(Runnable) - Improved error messages for better debugging
- This fix only affects Folia servers - Paper/Spigot servers were not impacted
- Need help?** Join our Discord: [https://discord.gg/ypa7Gvn433](https://discord.gg/ypa7Gvn433)
## 🚀 New Feature: Required/Optional Arguments
We've added powerful new argument handling features that make commands even more flexible!
### ✨ New Features
#### 📝 **Required Arguments Support**
- Mark individual arguments as required** using
required-args: [0] - First argument required, second optional? Now possible!
- Perfect for commands like
/ah sell <price> [amount] - Clear error messages when required arguments are missing
#### 🔢 **Individual Argument Variables**
- New variables**:
{arg:1},{arg:2},{arg:3}, etc. - Access each argument individually (1-based index)
{arg:1}** = First argument{arg:2}** = Second argument (empty string if not provided){arg:N}** = Nth argument{args}** = All arguments as string (backward compatible)
### 📋 Example Usage
``
yaml
ah:
subcommands:
sell: # /ah sell <price> [amount]
arguments:
required-args: [0] # First argument (price) is REQUIRED
no-arguments: false
commands:
- "tellraw {player} [\"\",{\"text\":\"Price: \",\"color\":\"gold\"},{\"text\":\"{arg:1}\",\"color\":\"green\"}]"
# {arg:1} = price (required)
# {arg:2} = amount (optional, empty if not provided)
`
- Usage:**
- ✅
/ah sell 100 → {arg:1} = "100", {arg:2} = ""✅ /ah sell 100 64 → {arg:1} = "100", {arg:2} = "64"❌ /ah sell → Error: "Usage: /ah sell <price> [amount]"
### 🔧 Technical Improvements
- Enhanced argument validation system
- Individual argument extraction and processing
- Improved variable replacement in messages and commands
- Better error messages for missing required arguments
### 📝 What Changed
- Added
required-args configuration optionImplemented individual argument variables ( {arg:1}, {arg:2}, etc.)Enhanced argument validation to check required arguments Updated variable replacement system
### 🎯 Compatibility
- ✅ **Fully backward compatible** - All existing
{args} usage still works✅ **No breaking changes** - Existing configurations work as before ✅ **Optional feature** - Only use if you need required/optional arguments
### 📦 Installation
Simply update to v1.1.1 - no configuration changes needed! Your existing commands will work exactly as before.
- Full Changelog:**
- Added
required-args configuration option for marking individual arguments as requiredImplemented individual argument variables: {arg:1}, {arg:2}, {arg:3}`, etc.- Need help?** Join our Discord: [https://discord.gg/2a4a3mWR4r](https://discord.gg/2a4a3mWR4r)
## 🚀 Major Update: Folia Compatibility
We're excited to announce **full Folia support**! Custom Commands now works seamlessly on both Paper and Folia servers.
### ✨ New Features
#### 🌿 **Folia Support**
- Full Folia compatibility** - Works on Folia servers without any issues
- Automatic detection and proper scheduler usage
- No configuration needed - it just works!
### 🔧 Technical Improvements
- Smart Scheduler Detection**: Automatically uses the correct scheduler for your server type
- Reflection-based Folia Support**: No additional dependencies required
- Improved Error Handling**: Better error messages and logging
### 📝 What Changed
- Added
folia-supported: trueto plugin.yml - Implemented Folia scheduler detection in command execution
- Integrated bStats metrics with custom charts
- Enhanced logging for better debugging
### 🎯 Compatibility
- ✅ **Paper 1.21.x**: Fully supported
- ✅ **Folia 1.21.x**: Now fully supported!
- ✅ **Backward Compatible**: All existing configurations work as before
### 📦 Installation
Simply update to v1.1.0 - no configuration changes needed! Your existing commands will work exactly as before.
### 🐛 Bug Fixes
- Fixed scheduler compatibility issues
- Improved command execution reliability
- Full Changelog:**
- Added Folia server support
- Improved scheduler detection and usage
- Enhanced error handling and logging
- Need help?** Join our Discord: [https://discord.gg/2a4a3mWR4r](https://discord.gg/2a4a3mWR4r)
## 🎮 New Features
We've added three powerful features that make custom commands more flexible and user-friendly!
### ✨ Feature 1: Arguments System
- Dynamic Command Arguments**
- Add arguments to any custom command or subcommand
- Use
{args}variable in messages and commands to access arguments - Configure whitelists, validation, and required arguments
- Support for arguments with spaces
- Configuration:**
yaml
arguments:
whitelist: ["hello", "goodbye"] # Allowed arguments
whitelist-only: true # Only allow whitelisted args
no-arguments: true # Allow command without args
invalid-message: "&cInvalid arguments!"
`
- Example:**
`yaml
say:
arguments:
whitelist: ["hello", "goodbye", "help"]
whitelist-only: true
commands:
- "say {player}: {args}" # Use {args} in commands
`
### ✨ Feature 2: Nested Subcommands
- Unlimited Command Nesting**
- Subcommands can now have their own subcommands (unlimited depth!)
- Perfect for organizing complex command structures
- Each level has its own permissions and messages
- Example:**
`yaml
admin:
subcommands:
player:
subcommands: # Nested subcommands!
kick:
commands:
- "kick {args} Kicked by admin"
ban:
commands:
- "ban {args} Banned by admin"
`
- Usage:**
/admin player kick Steve - Kicks a player/admin player ban Steve - Bans a player/admin server restart - Restarts the server
### ✨ Feature 3: Player Arguments (player-args)
- Automatic Player Validation**
- Mark specific arguments as player names using
player-args: [0]Automatic validation ensures players exist and are online Smart tab-completion shows all online players Clear error messages for invalid players
- Configuration:**
`yaml
kick:
arguments:
player-args: [0] # First argument = player name
no-arguments: false
commands:
- "kick {args} Kicked by {player}"
`
- Features:**
- ✅ Prevents typos and invalid player names
- ✅ Faster command usage with tab-completion
- ✅ Works with nested subcommands
- ✅ Multiple player arguments supported:
player-args: [0, 1]
### 📝 Combined Example
All three features work together perfectly:
`yaml
admin:
permission: "customcommands.admin"
subcommands:
player:
permission: "customcommands.admin.player"
subcommands: # Nested subcommands
kick:
permission: "customcommands.admin.player.kick"
arguments:
player-args: [0] # Player validation
no-arguments: false
commands:
- "kick {args} Kicked by {player}"
`
- Usage:**
/admin player kick SteveUses nested subcommands ( admin → player → kick)Validates that Steve is a valid online playerExecutes the kick command with the player name
### 🎯 Benefits
- Arguments System:**
- ✅ Flexible command input
- ✅ Input validation
- ✅ Whitelist support
- ✅ Use arguments in messages and commands
- Nested Subcommands:**
- ✅ Better command organization
- ✅ Unlimited nesting depth
- ✅ Individual permissions per level
- ✅ Clean command structure
- Player Arguments:**
- ✅ Automatic player validation
- ✅ Tab-completion for players
- ✅ Error prevention
- ✅ Better user experience
- Full Changelog:**
- Added arguments system with whitelist and validation support
- Implemented nested subcommands (unlimited depth)
- Added
player-args` configuration for automatic player name validation## ✨ New Feature: Command Type System
### ⚙️ Console vs Player Execution
You can now control how commands are executed when using custom commands!
- Console Type** (default): Commands execute as server console with full permissions
- Player Type**: Commands execute as the player who used the command (respects player permissions)
### 🎯 Use Cases
- Console Type** - Perfect for admin commands:
- Give effects, teleport players, kick/ban
- Works even if player doesn't have permission
- Player Type** - Perfect for plugin integration:
- Execute commands like
/home,/warp,/balance,/spawn - Player needs permission for the command to work
### 🎨 Example Usage
``
yaml
# Player executes /balance when using /hi
hi:
type: "Player"
commands:
- "/balance"
message:
- "&eChecking your balance..."
`
`yaml
# Console executes effect command (works without player permission)
glow:
type: "Console"
commands:
- "effect give {player} minecraft:glowing 10 1 true"
message:
- "&eYou are now glowing!"
`
## 🔄 Upgrade Guide
If you're upgrading from v1.0.0, you need to update your config.yml:
### 1. Change Field Name
- Change:**
console_commands: → commands:
### 2. Add Type Field (Optional)
Add the type field to control command execution. If not specified, defaults to "Console".
- Example:**
`yaml
# Old (v1.0.0)
example:
console_commands:
- "/balance"
- "effect give {player} minecraft:glowing 10 1 true"
# New (v1.0.1) - Console Type (default)
example:
type: "Console" # Optional: defaults to "Console" if not specified
commands:
- "/balance"
- "effect give {player} minecraft:glowing 10 1 true"
# New (v1.0.1) - Player Type
example:
type: "Player" # Commands execute as the player
commands:
- "/balance" # Player needs permission for /balance
`
- Steps:**
1. Replace all console_commands: with commands: in your config
2. (Optional) Add type: "Console" or type: "Player" to each command that has commands:
3. If type is not specified, it defaults to "Console" (same behavior as before)
The field name change makes more sense since commands can now execute as either Console or Player depending on the type setting.
## 📋 Technical Details
- Commands are executed on the main server thread
- Full variable support:
{player}, {world}, {x}, {y}, {z}`, etc.## 🔗 Links
- Discord**: [Join our Discord](https://discord.gg/vwrZFyzN)
## 🎉 Initial Release
First stable release of our powerful custom commands system for Paper servers!
## ✨ Features
- Custom Commands** with permissions, aliases, and cooldowns
- Subcommands** with tab completion
- Console Commands** with variable replacement ({player}, {world}, {x}, {y}, {z})
- Clickable Links** using (Text)[<URL>] syntax
- Modern Text** formatting with hex colors
- Hot Reload** configuration without restart
- Permission System** for commands and subcommands
## 📝 Example Commands
/discord- Discord server with clickable links/example- Console command execution demo/rules- Server rules display
## 🛠️ Requirements
- Paper 1.21.4+** (tested on 1.21.2-1.21.4)
- Java 21+**
- No deprecated APIs - Future-proof design
Ready for production use! Perfect for server owners wanting advanced custom commands.