Actually fix accidental breaking change not allowing aliases to be overridden.

This commit is contained in:
Andrew Steinborn
2020-07-30 06:06:37 -04:00
parent 7f1ee77a69
commit e3a95b4783

View File

@@ -112,6 +112,11 @@ public class VelocityCommandManager implements CommandManager {
dispatcher.getRoot().addChild(node);
while (aliasIterator.hasNext()) {
String otherAlias = aliasIterator.next();
CommandNode<CommandSource> existingNode = dispatcher.getRoot()
.getChild(alias.toLowerCase(Locale.ENGLISH));
if (existingNode != null) {
dispatcher.getRoot().getChildren().remove(existingNode);
}
dispatcher.getRoot().addChild(BrigadierUtils.buildRedirect(otherAlias, node));
}
}