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

import eu.mhsl.minenet.minigames.command.PrivilegedCommand;
import eu.mhsl.minenet.minigames.instance.game.stateless.StatelessGame;
import net.minestom.server.entity.Player;

public class GameStartCommand extends PrivilegedCommand {
    public GameStartCommand() {
        super("gameStart");
        setDefaultExecutor((sender, context) -> {
            Player player = (Player) sender;
            if(player.getInstance() instanceof StatelessGame game) {
                game.startAccessor();
            }
         });
    }
}
