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:
graywolf336
2014-02-11 20:34:35 -06:00
parent e078f73d3c
commit 58bc007b3e
29 changed files with 153 additions and 622 deletions

View File

@ -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);