Allow changing of a source after creation of a contextbuilder
This commit is contained in:
parent
e6b78a5f2a
commit
7d4dcc3e4b
1 changed files with 6 additions and 1 deletions
|
@ -9,13 +9,18 @@ import java.util.Map;
|
|||
public class CommandContextBuilder<S> {
|
||||
private final Map<String, ParsedArgument<?>> arguments = Maps.newHashMap();
|
||||
private final Map<CommandNode<S>, String> nodes = Maps.newLinkedHashMap();
|
||||
private final S source;
|
||||
private S source;
|
||||
private Command<S> command;
|
||||
|
||||
public CommandContextBuilder(S source) {
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public CommandContextBuilder<S> withSource(S source) {
|
||||
this.source = source;
|
||||
return this;
|
||||
}
|
||||
|
||||
public S getSource() {
|
||||
return source;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue