From 54faab8f0d83f3de1453621e4ef5506538de69d5 Mon Sep 17 00:00:00 2001 From: Jaida Wu Date: Wed, 20 Apr 2022 21:06:59 +0800 Subject: [PATCH] Add restart command Signed-off-by: Jaida Wu --- .../grasscutter/command/commands/Restart.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/main/java/emu/grasscutter/command/commands/Restart.java diff --git a/src/main/java/emu/grasscutter/command/commands/Restart.java b/src/main/java/emu/grasscutter/command/commands/Restart.java new file mode 100644 index 000000000..3457dc6c6 --- /dev/null +++ b/src/main/java/emu/grasscutter/command/commands/Restart.java @@ -0,0 +1,16 @@ +package emu.grasscutter.command.commands; + +import emu.grasscutter.command.Command; +import emu.grasscutter.command.CommandHandler; +import emu.grasscutter.game.GenshinPlayer; + +import java.util.List; + +@Command(label = "restart", usage = "restart - Restarts the current session") +public class Restart implements CommandHandler { + + @Override + public void onCommand(GenshinPlayer sender, List args) { + sender.getSession().close(); + } +}