mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-15 06:45:04 +01:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user