package org.openautonomousconnection.webserver.commands;

import dev.unlegitdqrk.unlegitlibrary.command.Command;
import dev.unlegitdqrk.unlegitlibrary.command.CommandExecutor;
import org.openautonomousconnection.webserver.Main;

import javax.management.InstanceAlreadyExistsException;
import java.util.ArrayList;
import java.util.Collections;

public class StopCommand extends Command {

    public StopCommand() throws InstanceAlreadyExistsException {
        super(Main.getCommandManager(), "stop", "Stop the Server", "stop", Collections.singletonList(Main.PERMISSION_ALL), new ArrayList<>());
    }

    @Override
    public void execute(CommandExecutor commandExecutor, String s, String[] strings) {
        System.exit(0);
    }
}
