Added StopCommand

This commit is contained in:
Finn
2026-01-18 22:55:58 +01:00
parent 9b924d186f
commit be5ecb9cc0
2 changed files with 29 additions and 4 deletions

View File

@@ -0,0 +1,21 @@
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);
}
}