Don't stop when a forked command failed
This commit is contained in:
parent
4b64169b59
commit
6f04756d34
2 changed files with 2 additions and 5 deletions
|
@ -3,7 +3,7 @@ import groovy.io.FileType
|
||||||
apply plugin: 'java-library'
|
apply plugin: 'java-library'
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven'
|
||||||
|
|
||||||
version = '0.1.14'
|
version = '0.1.15'
|
||||||
group = 'com.mojang'
|
group = 'com.mojang'
|
||||||
|
|
||||||
task wrapper(type: Wrapper) {
|
task wrapper(type: Wrapper) {
|
||||||
|
|
|
@ -101,12 +101,9 @@ public class CommandDispatcher<S> {
|
||||||
final CommandContext<S> context = builder.build(parse.getReader().getString());
|
final CommandContext<S> context = builder.build(parse.getReader().getString());
|
||||||
if (child != null) {
|
if (child != null) {
|
||||||
if (!child.getNodes().isEmpty()) {
|
if (!child.getNodes().isEmpty()) {
|
||||||
|
foundCommand = true;
|
||||||
final RedirectModifier<S> modifier = Iterators.getLast(builder.getNodes().keySet().iterator()).getRedirectModifier();
|
final RedirectModifier<S> modifier = Iterators.getLast(builder.getNodes().keySet().iterator()).getRedirectModifier();
|
||||||
final Collection<S> results = modifier.apply(context);
|
final Collection<S> results = modifier.apply(context);
|
||||||
if (results.isEmpty()) {
|
|
||||||
consumer.onCommandComplete(context, false, 0);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if (results.size() > 1) {
|
if (results.size() > 1) {
|
||||||
forked = true;
|
forked = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue