From 350d764383f33af3cf05b9285fe1ed155c05a59c Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Mon, 13 May 2024 15:51:22 -0700 Subject: [PATCH] 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. (cherry picked from commit 99f73e500b69b0c93b95a861ff39db2a1cc543e5) --- .../spottedleaf/dataconverter/util/CommandArgumentUpgrader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/ca/spottedleaf/dataconverter/util/CommandArgumentUpgrader.java b/src/main/java/ca/spottedleaf/dataconverter/util/CommandArgumentUpgrader.java index e0f2772..6f2a30e 100644 --- a/src/main/java/ca/spottedleaf/dataconverter/util/CommandArgumentUpgrader.java +++ b/src/main/java/ca/spottedleaf/dataconverter/util/CommandArgumentUpgrader.java @@ -117,7 +117,7 @@ private CommandArgumentUpgrader( new LiteralCommandNode<>( redirectNode.getName(), null, - null, + toNode.getRequirement(), toNode, redirectNode.getRedirectModifier(), redirectNode.isFork()