package eu.mhsl.minenet.minigames.command.privileged;

import eu.mhsl.minenet.minigames.command.PrivilegedCommand;
import net.minestom.server.command.builder.arguments.ArgumentType;
import net.minestom.server.command.builder.arguments.number.ArgumentInteger;

public class PlayerLimitCommand extends PrivilegedCommand {
    public PlayerLimitCommand() {
        super("playerLimit");

        ArgumentInteger count = ArgumentType.Integer("count");

        addSyntax((sender, context) -> {
            System.setProperty("minenet.playerlimit", String.valueOf(context.get(count)));
        }, count);
    }
}
