Command System
Overview
ChatControl registers a main /chc (ChatControl) command group with many subcommands, plus standalone commands like /tell, /channel, /mail, etc. All command aliases are configurable in settings.yml.
Architecture
Key Classes
- •
ChatControlCommands(command/chatcontrol/) — main/chccommand group - •
ChannelCommands(command/channel/) —/channelcommand group - •
SharedChatControlCommandCore— shared helper interface with lookup utilities - •Various
Command*.javafiles — standalone commands
Foundation Command Framework
- •
SimpleCommandGroup— groups subcommands under one label - •
SimpleCommand/SimpleSubCommand— individual command implementations - •
@Permission/@PermissionGroupannotations — permission declarations
Common Issues & Solutions
"Command not found"
- •Check command aliases in settings.yml
- •Verify player has the permission node
- •
/chc permslists all available permissions - •Other plugins may override command aliases
"Tab completion not working"
- •ChatControl uses Foundation's tab completion system
- •Check
tabComplete()method in the command class - •Verify
chatcontrol.bypass.tab.completeisn't interfering
"Can't tell/reply to offline player"
- •PMs require target to be online (or on proxy network)
- •Reply requires recent PM exchange (
PlayerCache.replyPlayerName)
"Command conflicts with other plugins"
- •Change aliases in settings.yml to avoid conflicts
- •ChatControl registers commands at plugin load
- •Use namespaced commands:
/chatcontrol:tell
Key File Paths
- •Main command group:
chatcontrol-bukkit/src/main/java/org/mineacademy/chatcontrol/command/chatcontrol/ - •Channel commands:
chatcontrol-bukkit/src/main/java/org/mineacademy/chatcontrol/command/channel/ - •Standalone commands:
chatcontrol-bukkit/src/main/java/org/mineacademy/chatcontrol/command/ - •Shared utilities:
chatcontrol-bukkit/src/main/java/org/mineacademy/chatcontrol/command/SharedChatControlCommandCore.java - •Permissions:
chatcontrol-core/src/main/java/org/mineacademy/chatcontrol/model/Permissions.java
Reference
For configuration keys, default values, commands, permissions, and variables not covered above, read the source files directly using read_codebase_file. The key file paths above point to the most relevant files.