Correctly unregistering Hub command and aliases
NaTorOG opened this issue · comments
Pino commented
In VelocityTools.java, you should technically move these method inside the if clause.
List<String> aliases = Settings.IMP.COMMANDS.HUB.ALIASES;
aliases.forEach(alias -> this.server.getCommandManager().unregister(alias));
if (Settings.IMP.COMMANDS.HUB.ENABLED && !aliases.isEmpty()) {
List<String> aliases = Settings.IMP.COMMANDS.HUB.ALIASES;
aliases.forEach(alias -> this.server.getCommandManager().unregister(alias));
this.server.getCommandManager().register(aliases.get(0), new HubCommand(this.server), aliases.toArray(new String[0]));
}
This way we can avoid issues with other /hub or /lobby plugins since I can't use them anymore even with command disabled in the config of your plugin
ruViolence commented
I've already made the fix, let's wait till the merge #33