diff options
author | Jason Penilla <[email protected]> | 2024-05-13 15:55:15 -0700 |
---|---|---|
committer | Spottedleaf <[email protected]> | 2024-05-13 15:55:15 -0700 |
commit | 2faa3b2f44c962ce7413e8e3d71e32786851d556 (patch) | |
tree | d6d66c3227323a60e79a84329120b6a9f8249bac | |
parent | bebcc9cc933bd13a841844c250dcb83bd132a8e7 (diff) | |
download | Paper-2faa3b2f44c962ce7413e8e3d71e32786851d556.tar.gz Paper-2faa3b2f44c962ce7413e8e3d71e32786851d556.zip |
Correctly copy alias requirements in command upgrader
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.
-rw-r--r-- | patches/server/0975-Rewrite-dataconverter-system.patch | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/patches/server/0975-Rewrite-dataconverter-system.patch b/patches/server/0975-Rewrite-dataconverter-system.patch index e96c877748..dbf83932c0 100644 --- a/patches/server/0975-Rewrite-dataconverter-system.patch +++ b/patches/server/0975-Rewrite-dataconverter-system.patch @@ -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 @@ @@ -27842,7 +27842,7 @@ index 0000000000000000000000000000000000000000..e0f2772fa51e47b45eda5781ea8c34e5 + new LiteralCommandNode<>( + redirectNode.getName(), + null, -+ null, ++ toNode.getRequirement(), + toNode, + redirectNode.getRedirectModifier(), + redirectNode.isFork() |