mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 14:38:53 +00:00
fix: namespace-backed aliases not being registered, close #795
This commit is contained in:
1 file changed
+7
-3
@@ -73,10 +73,14 @@ public class FabricCommand {
|
||||
|
||||
// Register aliases
|
||||
final LiteralCommandNode<ServerCommandSource> node = dispatcher.register(builder);
|
||||
dispatcher.register(literal("huskhomes:" + command.getName())
|
||||
dispatcher.register(literal("huskhomes:%s".formatted(command.getName()))
|
||||
.requires(predicate).executes(getBrigadierExecutor()).redirect(node));
|
||||
command.getAliases().forEach(alias -> dispatcher.register(literal(alias)
|
||||
.requires(predicate).executes(getBrigadierExecutor()).redirect(node)));
|
||||
command.getAliases().forEach(alias -> {
|
||||
dispatcher.register(literal(alias).requires(predicate)
|
||||
.executes(getBrigadierExecutor()).redirect(node));
|
||||
dispatcher.register(literal("huskhomes:%s".formatted(alias)).requires(predicate)
|
||||
.executes(getBrigadierExecutor()).redirect(node));
|
||||
});
|
||||
}
|
||||
|
||||
private com.mojang.brigadier.Command<ServerCommandSource> getBrigadierExecutor() {
|
||||
|
||||
Reference in new issue
Block a user