aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/brigadier/NEUBrigadierHook.kt1
-rw-r--r--src/main/kotlin/io/github/moulberry/notenoughupdates/util/brigadier/BrigadierRoot.kt2
2 files changed, 1 insertions, 2 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/brigadier/NEUBrigadierHook.kt b/src/main/java/io/github/moulberry/notenoughupdates/util/brigadier/NEUBrigadierHook.kt
index abe13be0..668c412a 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/util/brigadier/NEUBrigadierHook.kt
+++ b/src/main/java/io/github/moulberry/notenoughupdates/util/brigadier/NEUBrigadierHook.kt
@@ -72,7 +72,6 @@ class NEUBrigadierHook(
try {
brigadierRoot.dispatcher.execute(results)
} catch (syntax: CommandSyntaxException) {
- sender.addChatMessage(ChatComponentText("${YELLOW}[NEU] $RED${syntax.message}"))
brigadierRoot.getAllUsages("/$commandName", commandNode, mutableSetOf()).forEach {
sender.addChatMessage(ChatComponentText("${YELLOW}[NEU] ${it.path} - ${it.help}"))
}
diff --git a/src/main/kotlin/io/github/moulberry/notenoughupdates/util/brigadier/BrigadierRoot.kt b/src/main/kotlin/io/github/moulberry/notenoughupdates/util/brigadier/BrigadierRoot.kt
index 8035c77e..66008044 100644
--- a/src/main/kotlin/io/github/moulberry/notenoughupdates/util/brigadier/BrigadierRoot.kt
+++ b/src/main/kotlin/io/github/moulberry/notenoughupdates/util/brigadier/BrigadierRoot.kt
@@ -62,7 +62,7 @@ object BrigadierRoot {
visited.add(node)
val redirect = node.redirect
if (redirect != null) {
- yieldAll(getAllUsages(path, node, visited))
+ yieldAll(getAllUsages(path, node.redirect, visited))
visited.remove(node)
return@sequence
}