fallback code for command lookup

This commit is contained in:
tahg 2011-02-01 21:56:16 -08:00
parent 01988e8f6b
commit 00d4e1a2e0

View File

@ -72,6 +72,12 @@ public final class SimpleCommandMap implements CommandMap {
Command target = knownCommands.get(sentCommandLabel); Command target = knownCommands.get(sentCommandLabel);
boolean isRegisteredCommand = (target != null); boolean isRegisteredCommand = (target != null);
if (isRegisteredCommand) {
target.execute(sender, sentCommandLabel, args);
return true;
}
target = knownCommands.get(sentCommandLabel.substring(1));
isRegisteredCommand = (target != null);
if (isRegisteredCommand) { if (isRegisteredCommand) {
target.execute(sender, sentCommandLabel, args); target.execute(sender, sentCommandLabel, args);
} }