Closed rjworks closed 4 years ago
Create enum
class WarpEnumArgument extends StringEnumArgument
{
public function getTypeName(): string
{
return "string";
}
public function parse(string $argument, CommandSender $sender)
{
return $argument;
}
public function getEnumValues(): array
{
return MyWarps::getWarps();
}
public function getEnumName(): string
{
return "warp";
}
}
Your command:
protected function prepare(): void {
...
$this->registerArgument(0, new WarpEnumArgument("warp", false));
}
how to make a warps list arg? player type /warp and it shows all warps in my config