Commands
Commands
Section titled “Commands”The Custom Commands plugin provides several built-in commands for managing and using the plugin. This guide covers all available commands and their usage.
Main Commands
Section titled “Main Commands”/customcommands
Section titled “/customcommands”The main command for the Custom Commands plugin.
Aliases: cc, customcmd
Permission: customcommands.use
Usage:
/customcommands [subcommand]Subcommands:
help- Show help informationreload- Reload configuration filesversion- Show plugin versioninfo- Show plugin informationsupport- Show support information
Short alias for the main command.
Permission: customcommands.use
Usage:
/cc [subcommand]Subcommands
Section titled “Subcommands”/customcommands help
Section titled “/customcommands help”Shows help information and available commands.
Permission: customcommands.help (default: true)
Usage:
/customcommands help/cc helpExample Output:
[CustomCommands] === Custom Commands Help ===/customcommands reload - Reload configuration files/customcommands help - Show this help message/customcommands version - Show plugin version/customcommands support - Show support information[CustomCommands] ==============================/customcommands reload
Section titled “/customcommands reload”Reloads all configuration files without restarting the server.
Permission: customcommands.reload (default: op)
Usage:
/customcommands reload/cc reloadWhat Gets Reloaded:
config.yml- All command configurationsmessages.yml- All message configurations- Permission settings
- Debug settings
Example Output:
[CustomCommands] Reloading configuration files...[CustomCommands] Configuration files reloaded successfully!Error Handling: If reload fails, the plugin will:
- Show an error message
- Keep the previous configuration active
- Log detailed error information
/customcommands version
Section titled “/customcommands version”Shows the plugin version and author information.
Permission: customcommands.version (default: true)
Usage:
/customcommands version/cc versionExample Output:
[CustomCommands] Custom Commands v1.0.0[CustomCommands] Author: Kzlyth/customcommands info
Section titled “/customcommands info”Shows detailed plugin information.
Permission: customcommands.info (default: true)
Usage:
/customcommands info/cc infoExample Output:
[CustomCommands] Custom Commands v1.0.0[CustomCommands] Author: Kzlyth[CustomCommands] Use /customcommands help for available commands/customcommands support
Section titled “/customcommands support”Shows support information and Discord link.
Permission: customcommands.support (default: true)
Usage:
/customcommands support/cc supportExample Output:
[CustomCommands] === Support Information ===Discord Server: https://discord.gg/2qCMn6KHj4Join our Discord for support and updates![CustomCommands] ==============================Custom Commands
Section titled “Custom Commands”The plugin also registers all custom commands defined in config.yml. These commands are created dynamically based on your configuration.
Example Custom Commands
Section titled “Example Custom Commands”Based on the default configuration, these commands are available:
/discord
Section titled “/discord”Shows Discord server information with clickable link.
Permission: customcommands.discord (default: true)
Aliases: dc
Usage:
/discord/dcSubcommands:
/discord send- Send Discord invite to DMs/discord invite- Show clickable Discord link/discord help- Show available subcommands
/website
Section titled “/website”Shows website link with clickable URL.
Permission: customcommands.website (default: true)
Aliases: web, site
Usage:
/website/web/site/rules
Section titled “/rules”Shows server rules.
Permission: customcommands.rules (default: true)
Aliases: rule
Usage:
/rules/rule/example
Section titled “/example”Example command demonstrating console command execution.
Permission: customcommands.example (default: true)
Aliases: ex, demo
Usage:
/example/ex/demoCommand Features
Section titled “Command Features”Tab Completion
Section titled “Tab Completion”All commands support tab completion:
- Main commands show available subcommands
- Subcommands show relevant options
- Permission-based completion (only shows what player can use)
Permission System
Section titled “Permission System”Each command has its own permission node:
- Main command:
customcommands.commandname - Subcommand:
customcommands.commandname.subcommandname - Admin commands:
customcommands.admin
Cooldown System
Section titled “Cooldown System”Custom commands can have cooldowns:
- Per-player cooldowns
- Configurable duration
- Custom cooldown messages
- Zero cooldown for instant reuse
Error Handling
Section titled “Error Handling”The plugin provides helpful error messages:
- Command not found
- Permission denied
- Cooldown active
- Command disabled
Command Examples
Section titled “Command Examples”Basic Usage
Section titled “Basic Usage”# Show help/customcommands help
# Reload configuration/customcommands reload
# Check version/customcommands version
# Get support/customcommands supportCustom Command Usage
Section titled “Custom Command Usage”# Discord information/discord/dc
# Website link/website/web
# Server rules/rules/rule
# Example command/example/exSubcommand Usage
Section titled “Subcommand Usage”# Discord subcommands/discord send/discord invite/discord help
# Short aliases/dc send/dc invite/dc helpTroubleshooting
Section titled “Troubleshooting”Common Issues
Section titled “Common Issues”Command Not Found
Section titled “Command Not Found”Problem: Command doesn’t respond
Solutions:
- Check if plugin is enabled:
/plugins - Verify command spelling
- Check if command is enabled in config
- Use
/customcommands reload
Permission Denied
Section titled “Permission Denied”Problem: “You don’t have permission” message
Solutions:
- Check permission nodes
- Verify player has correct permissions
- Use a permissions plugin (LuckPerms, etc.)
- Check permission format
Cooldown Active
Section titled “Cooldown Active”Problem: “You must wait X seconds” message
Solutions:
- Wait for cooldown to expire
- Check cooldown setting in config
- Set cooldown to 0 for no cooldown
- Use different command if available
Debug Information
Section titled “Debug Information”Enable Debug Mode
Section titled “Enable Debug Mode”In config.yml:
debug: enabled: true console: true file: trueCheck Logs
Section titled “Check Logs”plugins/CustomCommands/logs/latest.logTest Commands
Section titled “Test Commands”# Test main command/customcommands help
# Test reload/customcommands reload
# Test custom commands/discord/website/rulesCommand Permissions
Section titled “Command Permissions”Permission Structure
Section titled “Permission Structure”customcommands.* # All permissions (OP only)customcommands.use # Basic usage (default: true)customcommands.reload # Reload configuration (OP only)customcommands.help # View help (default: true)customcommands.version # View version (default: true)customcommands.info # View info (default: true)customcommands.support # View support (default: true)customcommands.admin # Administrative access (OP only)
# Custom command permissionscustomcommands.discord # Discord commandcustomcommands.website # Website commandcustomcommands.rules # Rules commandcustomcommands.example # Example command
# Subcommand permissionscustomcommands.discord.send # Discord send subcommandcustomcommands.discord.invite # Discord invite subcommandcustomcommands.discord.help # Discord help subcommandSetting Permissions
Section titled “Setting Permissions”With LuckPerms
Section titled “With LuckPerms”# Give basic usage/lp user <player> permission set customcommands.use true
# Give specific command/lp user <player> permission set customcommands.discord true
# Give all permissions/lp user <player> permission set customcommands.* trueWith PermissionsEx
Section titled “With PermissionsEx”groups: default: permissions: - customcommands.use - customcommands.discord - customcommands.website - customcommands.rulesNext Steps
Section titled “Next Steps”Now that you understand the command system:
- Read the Configuration Guide - Learn how to create custom commands
- Check out Examples - See practical command examples
- Explore Permissions - Set up proper permission systems
For support and updates, join our Discord server.