2025-03-11 00:23:54 +01:00
|
|
|
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]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2025-03-25 23:10:40 +01:00
|
|
|
public String[] getCompletions(CommandEnvironment env) {
|
2025-03-11 00:23:54 +01:00
|
|
|
return this.defCompletions;
|
|
|
|
}
|
|
|
|
}
|