Remove all reference to jcommands and use jewelcli.
This commit also cleans up the jail command to be quicker as the old way I was doing it just didn't work nor was it good to go for production. This method also utilizes the CommandInfo's pattern to match subcommands, like it was meant to be used for. Completely untested.
This commit is contained in:
@ -58,11 +58,13 @@ public class CommandHandler {
|
||||
public void handleCommand(JailManager jailmanager, CommandSender sender, String command, String[] args) {
|
||||
List<Command> matches = getMatches(command);
|
||||
|
||||
//If no matches were found, send them the unknown command message.
|
||||
if(matches.size() == 0) {
|
||||
sender.sendMessage(jailmanager.getPlugin().getJailIO().getLanguageString(LangString.UNKNOWNCOMMAND, command));
|
||||
return;
|
||||
}
|
||||
|
||||
//If more than one command was found, send them each command's help message.
|
||||
if(matches.size() > 1) {
|
||||
for(Command c : matches)
|
||||
showUsage(sender, c);
|
||||
|
Reference in New Issue
Block a user