Skip to content

Commit

Permalink
Correctly copy alias requirements in command upgrader
Browse files Browse the repository at this point in the history
Fixes NPE when converting namespaced commands.

Since the brigadier command api, more aliased commands
(namespaced variants) are registered in the vanilla dispatcher,
which made this issue more apparent.
  • Loading branch information
jpenilla authored and Spottedleaf committed May 13, 2024
1 parent bebcc9c commit 2faa3b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions patches/server/0975-Rewrite-dataconverter-system.patch
Original file line number Diff line number Diff line change
Expand Up @@ -27719,7 +27719,7 @@ index 0000000000000000000000000000000000000000..62c0f4073aff301bf5b3187e0d4446fd
+}
diff --git a/src/main/java/ca/spottedleaf/dataconverter/util/CommandArgumentUpgrader.java b/src/main/java/ca/spottedleaf/dataconverter/util/CommandArgumentUpgrader.java
new file mode 100644
index 0000000000000000000000000000000000000000..e0f2772fa51e47b45eda5781ea8c34e59cc4b285
index 0000000000000000000000000000000000000000..6f2a30eed4e9741a128b5a171edef6abedab7362
--- /dev/null
+++ b/src/main/java/ca/spottedleaf/dataconverter/util/CommandArgumentUpgrader.java
@@ -0,0 +1,491 @@
Expand Down Expand Up @@ -27842,7 +27842,7 @@ index 0000000000000000000000000000000000000000..e0f2772fa51e47b45eda5781ea8c34e5
+ new LiteralCommandNode<>(
+ redirectNode.getName(),
+ null,
+ null,
+ toNode.getRequirement(),
+ toNode,
+ redirectNode.getRedirectModifier(),
+ redirectNode.isFork()
Expand Down

0 comments on commit 2faa3b2

Please sign in to comment.