mirror of https://github.com/PaperMC/Paper.git
Adjust alias redirect building
This commit is contained in:
parent
c3810c9a7a
commit
a742aa741d
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue