mirror of
https://github.com/ViaVersion/ViaProxy.git
synced 2025-02-10 00:31:42 +01:00
Added 'exit' command to shutdown ViaProxy
This commit is contained in:
parent
3259ec150f
commit
2196ed5258
@ -58,6 +58,8 @@ public class ConsoleHandler {
|
||||
System.out.println("GC Done");
|
||||
} else if (command.equalsIgnoreCase("via") || command.equalsIgnoreCase("viaversion")) {
|
||||
Via.getManager().getCommandHandler().onCommand(new ConsoleCommandSender(), args.getAsArray());
|
||||
} else if (command.equalsIgnoreCase("exit")) {
|
||||
System.exit(0);
|
||||
} else if (command.equalsIgnoreCase("threaddump")) {
|
||||
System.out.println("Thread Dump:");
|
||||
for (Thread thread : Thread.getAllStackTraces().keySet()) {
|
||||
@ -67,8 +69,9 @@ public class ConsoleHandler {
|
||||
} else {
|
||||
if (PluginManager.EVENT_MANAGER.call(new ConsoleCommandEvent(command, args.getAsArray())).isCancelled()) continue;
|
||||
System.out.println("Invalid Command!");
|
||||
System.out.println(" via | Run a viaversion command");
|
||||
System.out.println(" gc | Run the garbage collector");
|
||||
System.out.println(" exit | Shutdown ViaProxy");
|
||||
System.out.println(" via | Run a viaversion command");
|
||||
System.out.println(" threaddump | Print the stacktrace of all running threads");
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
|
Loading…
Reference in New Issue
Block a user