Added a stop command

I found the absence of a stop command particuraly annoying so i implemented it in 10 minutes
This commit is contained in:
Kostas214
2024-03-12 23:53:31 +02:00
committed by Melledy
parent dd9646cfc8
commit a6b656bdd2
2 changed files with 21 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
package emu.lunarcore.command.commands;
import emu.lunarcore.command.Command;
import emu.lunarcore.command.CommandArgs;
import emu.lunarcore.command.CommandHandler;
@Command(label = "stop",
aliases = {"exit"},
permission = "admin.stop",
requireTarget = false,
desc = "/stop - Stops the server")
public class StopCommand implements CommandHandler {
@Override
public void execute(CommandArgs args) {
args.sendMessage("Stopping server");
System.exit(1000);
}
}