Fix raw input in command execution
This commit is contained in:
parent
d0162c3317
commit
9c85db386f
2 changed files with 3 additions and 1 deletions
|
|
@ -171,6 +171,8 @@ public abstract class CommandManager<C> {
|
||||||
this
|
this
|
||||||
);
|
);
|
||||||
final LinkedList<String> inputQueue = new CommandInputTokenizer(input).tokenize();
|
final LinkedList<String> inputQueue = new CommandInputTokenizer(input).tokenize();
|
||||||
|
/* Store a copy of the input queue in the context */
|
||||||
|
context.store("__raw_input__", new LinkedList<>(inputQueue));
|
||||||
try {
|
try {
|
||||||
if (this.preprocessContext(context, inputQueue) == State.ACCEPTED) {
|
if (this.preprocessContext(context, inputQueue) == State.ACCEPTED) {
|
||||||
return this.commandExecutionCoordinator.coordinateExecution(context, inputQueue);
|
return this.commandExecutionCoordinator.coordinateExecution(context, inputQueue);
|
||||||
|
|
|
||||||
|
|
@ -537,7 +537,7 @@ public final class CommandContext<C> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the raw input. This should only be used when {@link #isSuggestions()} is {@code true}
|
* Get the raw input.
|
||||||
*
|
*
|
||||||
* @return Raw input in token form
|
* @return Raw input in token form
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue