Перейти к содержимому
Mineforgian

CustomCommands

A powerful custom commands plugin with subcommands, console command execution, and clickable links. Create unlimited custom commands with variable replacement, permissions, and modern text formatting for your Paper server.

Загрузки
3K
Подписчики
9
Обновлён
2 февраля 2026 г.
Лицензия
Apache-2.0

Опубликован 18 октября 2025 г.

Custom 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

  1. Download the plugin JAR file
  2. Place it in your server's plugins folder
  3. Restart your server
  4. Configure commands in plugins/CustomCommands/config.yml
  5. Use /customcommands reload to reload configuration

Commands

  • /customcommands - Main command
  • /customcommands reload - Reload configuration
  • /customcommands help - Show help
  • /customcommands support - Show support information
  • /customcommands version - Show version info

Permissions

  • customcommands.* - All permissions
  • customcommands.use - Basic usage
  • customcommands.reload - Reload configuration
  • customcommands.commandname - Use specific command
  • customcommands.commandname.subcommand - Use specific subcommand
  • customcommands.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

Bstatistics

Ченджлог

1.1.4Релиз26.1, 26.1.1, 26.1.2 · 2 февраля 2026 г.

🎉 Custom Commands v1.1.4 - Folia Player Commands Fix

🐛 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 async when players used commands with type: "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
1.1.3Релиз1.21.9, 1.21.10, 1.21.11 · 2 февраля 2026 г.

🎉 Custom Commands v1.1.3 - Critical Bugfixes

🐛 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 /discord or /website did 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 NoSuchMethodException when 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

1.1.2Релиз1.21.9, 1.21.10, 1.21.11 · 16 декабря 2025 г.

🎉 Custom Commands v1.1.2 - Folia Bugfix

🐛 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 NoSuchMethodException when 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

1.1.1Релиз1.21.8, 1.21.9, 1.21.10 · 8 декабря 2025 г.

🎉 Custom Commands v1.1.1 - Required Arguments & Individual Argument Variables

🚀 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

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 [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 option
  • Implemented 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 required
  • Implemented individual argument variables: {arg:1}, {arg:2}, {arg:3}, etc.
  • Enhanced argument validation to check for required arguments
  • Improved variable replacement system for better argument handling
  • Updated documentation with new examples

Need help? Join our Discord: https://discord.gg/2a4a3mWR4r

1.1.0Релиз1.21.8, 1.21.9, 1.21.10 · 18 ноября 2025 г.

🎉 Custom Commands v1.1.0 - Folia Support & bStats Integration

🚀 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: true to 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

1.0.3Релиз1.21.8, 1.21.9, 1.21.10 · 17 ноября 2025 г.

I found a major problem in the plugin that was mishandling commands.

1.0.2Релиз1.21.8, 1.21.9, 1.21.10 · 16 ноября 2025 г.

Custom Commands Major Update - Arguments, Nesting & Player Validation

🎮 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:

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:

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:

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:

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:

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 Steve

  • Uses nested subcommands (adminplayerkick)
  • Validates that Steve is a valid online player
  • Executes 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
  • Implemented automatic tab-completion for player arguments
  • Added player-specific error messages
  • Fixed spam issue with tellraw commands
  • Improved argument handling and validation
  • Enhanced tab-completion system
1.0.1Релиз1.21.8, 1.21.9, 1.21.10 · 15 ноября 2025 г.

Custom Commands v1.0.1 Update

✨ 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

# Player executes /balance when using /hi
hi:
  type: "Player"
  commands:
    - "/balance"
  message:
    - "&eChecking your balance..."
# 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:

# 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.
  • Works with all Minecraft commands and plugin commands
  • Thread-safe and performance optimized

🔗 Links

Комментарии

Загружаем…