Skip to content

Commit

Permalink
Don't stop when a forked command failed
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinnerbone committed Dec 12, 2017
1 parent 4b64169 commit 6f04756
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 1 addition & 4 deletions src/main/java/com/mojang/brigadier/CommandDispatcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,9 @@ public int execute(final ParseResults<S> parse) throws CommandSyntaxException {
final CommandContext<S> context = builder.build(parse.getReader().getString());
if (child != null) {
if (!child.getNodes().isEmpty()) {
foundCommand = true;
final RedirectModifier<S> modifier = Iterators.getLast(builder.getNodes().keySet().iterator()).getRedirectModifier();
final Collection<S> results = modifier.apply(context);
if (results.isEmpty()) {
consumer.onCommandComplete(context, false, 0);
return 0;
}
if (results.size() > 1) {
forked = true;
}
Expand Down

0 comments on commit 6f04756

Please sign in to comment.