From 6f04756d34f6bf2be4d4d272ff8dfab65a2aa888 Mon Sep 17 00:00:00 2001 From: Nathan Adams Date: Tue, 12 Dec 2017 09:56:02 +0100 Subject: [PATCH] Don't stop when a forked command failed --- build.gradle | 2 +- src/main/java/com/mojang/brigadier/CommandDispatcher.java | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index cb45c81..da78430 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ import groovy.io.FileType apply plugin: 'java-library' apply plugin: 'maven' -version = '0.1.14' +version = '0.1.15' group = 'com.mojang' task wrapper(type: Wrapper) { diff --git a/src/main/java/com/mojang/brigadier/CommandDispatcher.java b/src/main/java/com/mojang/brigadier/CommandDispatcher.java index 392e55d..805580c 100644 --- a/src/main/java/com/mojang/brigadier/CommandDispatcher.java +++ b/src/main/java/com/mojang/brigadier/CommandDispatcher.java @@ -101,12 +101,9 @@ public class CommandDispatcher { final CommandContext context = builder.build(parse.getReader().getString()); if (child != null) { if (!child.getNodes().isEmpty()) { + foundCommand = true; final RedirectModifier modifier = Iterators.getLast(builder.getNodes().keySet().iterator()).getRedirectModifier(); final Collection results = modifier.apply(context); - if (results.isEmpty()) { - consumer.onCommandComplete(context, false, 0); - return 0; - } if (results.size() > 1) { forked = true; }