Adjust alias redirect building

This commit is contained in:
Jason Penilla 2024-05-07 19:08:44 -07:00 committed by Jake Potrebic
parent c3810c9a7a
commit a742aa741d
No known key found for this signature in database
GPG Key ID: ECE0B3C133C016C5
1 changed files with 3 additions and 5 deletions

View File

@ -509,10 +509,10 @@ index 0000000000000000000000000000000000000000..1b1642f306771f029e6214a2e2ebebb6
+}
diff --git a/src/main/java/io/papermc/paper/command/brigadier/PaperCommands.java b/src/main/java/io/papermc/paper/command/brigadier/PaperCommands.java
new file mode 100644
index 0000000000000000000000000000000000000000..b7f1c15800f175760717fcea38a7256a6fba2a63
index 0000000000000000000000000000000000000000..9410809ad964eb4ab67f6db67e63fa2fe78418d5
--- /dev/null
+++ b/src/main/java/io/papermc/paper/command/brigadier/PaperCommands.java
@@ -0,0 +1,179 @@
@@ -0,0 +1,177 @@
+package io.papermc.paper.command.brigadier;
+
+import com.google.common.base.Preconditions;
@ -635,11 +635,9 @@ index 0000000000000000000000000000000000000000..b7f1c15800f175760717fcea38a7256a
+ .executes(redirectTo.getCommand())
+ .requires(redirectTo.getRequirement())
+ .build();
+ for (final CommandNode<CommandSourceStack> child : redirectTo.getChildren()) {
+ redirect.addChild(child);
+ }
+ } else {
+ redirect = Commands.literal(aliasLiteral)
+ .executes(redirectTo.getCommand())
+ .redirect(redirectTo)
+ .requires(redirectTo.getRequirement())
+ .build();