Fixed minor bug with alias registration and removed debug output

This commit is contained in:
VictorD 2011-01-18 01:54:48 +01:00
parent 0951ed5de8
commit 6f07a1bbb2

View File

@ -33,13 +33,11 @@ public final class SimpleCommandMap implements CommandMap {
* {@inheritDoc}
*/
public boolean register(String name, String fallbackPrefix, Command command) {
boolean nameInUse = (knownCommands.get(command.getName()) != null);
boolean nameInUse = (knownCommands.get(name) != null);
if (nameInUse)
name = fallbackPrefix + ":" + name;
knownCommands.put(name, command);
System.out.println("Adding cmd: " + name + " for plugin " + fallbackPrefix);
return !nameInUse;
}