mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 04:05:50 -07:00
Fixed minor bug with alias registration and removed debug output
By: VictorD <victor.danell@gmail.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user