Fixed a bug in redirected contexts, version to 0.1.17

This commit is contained in:
Nathan Adams
2018-01-16 15:14:30 +01:00
parent a40cb8869f
commit 6a5289fa33
3 changed files with 5 additions and 2 deletions
@@ -108,7 +108,7 @@ public class CommandDispatcher<S> {
if (next == null) {
next = new ArrayList<>(1);
}
next.add(child);
next.add(child.copyFor(context.getSource()));
} else {
final Collection<S> results = modifier.apply(context);
if (!results.isEmpty()) {
@@ -30,6 +30,9 @@ public class CommandContext<S> {
}
public CommandContext<S> copyFor(final S source) {
if (this.source == source) {
return this;
}
return new CommandContext<>(source, input, arguments, command, nodes, range, child, modifier);
}