mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 15:49:00 +01:00
Fixed minor bug with alias registration and removed debug output
By: VictorD <victor.danell@gmail.com>
This commit is contained in:
parent
ab6f5d4bc2
commit
2c532f4d88
1 changed files with 1 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue