Fixed minor bug with alias registration and removed debug output

By: VictorD <victor.danell@gmail.com>
This commit is contained in:
Bukkit/Spigot 2011-01-18 01:54:48 +01:00
parent ab6f5d4bc2
commit 2c532f4d88

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;
}