18 lines
473 B
Java
18 lines
473 B
Java
![]() |
package game.command;
|
||
|
|
||
|
public abstract class CompletingParser extends ArgumentParser {
|
||
|
private final String[] defCompletions;
|
||
|
|
||
|
public CompletingParser(String name, Object ... completions) {
|
||
|
super(name);
|
||
|
this.defCompletions = new String[completions.length];
|
||
|
for(int z = 0; z < completions.length; z++) {
|
||
|
this.defCompletions[z] = String.valueOf(completions[z]);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public String[] getCompletions(ScriptEnvironment env) {
|
||
|
return this.defCompletions;
|
||
|
}
|
||
|
}
|