🐛 Actually fix double namespaced commands

This commit is contained in:
jmp 2020-10-07 11:53:39 -07:00 committed by Alexander Söderberg
parent 1fa0eead69
commit 2bad5759c6

View file

@ -76,17 +76,7 @@ public class BukkitPluginRegistrationHandler<C> implements CommandRegistrationHa
&& this.registeredCommands.containsKey(commandArgument)) { && this.registeredCommands.containsKey(commandArgument)) {
return false; return false;
} }
final String label = commandArgument.getName();
final String label;
final String prefixedLabel = String.format("%s:%s", this.bukkitCommandManager.getOwningPlugin().getName(),
commandArgument.getName()
).toLowerCase();
if (!(this.bukkitCommandManager.getCommandRegistrationHandler() instanceof CloudCommodoreManager)
&& bukkitCommands.containsKey(commandArgument.getName())) {
label = prefixedLabel;
} else {
label = commandArgument.getName();
}
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
final List<String> aliases = new ArrayList<>(((StaticArgument<C>) commandArgument).getAlternativeAliases()); final List<String> aliases = new ArrayList<>(((StaticArgument<C>) commandArgument).getAlternativeAliases());