This commit is contained in:
Anuken
2020-11-17 16:06:02 -05:00
parent e453c6033a
commit 8280166485
8 changed files with 15 additions and 20 deletions

View File

@@ -58,6 +58,10 @@ public class ServerControl implements ApplicationListener{
private String suggested;
public ServerControl(String[] args){
setup(args);
}
protected void setup(String[] args){
Core.settings.defaults(
"bans", "",
"admins", "",
@@ -254,7 +258,7 @@ public class ServerControl implements ApplicationListener{
info("Server loaded. Type @ for help.", "'help'");
}
private void registerCommands(){
protected void registerCommands(){
handler.register("help", "Displays this command list.", arg -> {
info("Commands:");
for(Command command : handler.getCommandList()){
@@ -273,6 +277,7 @@ public class ServerControl implements ApplicationListener{
Core.app.exit();
});
handler.register("stop", "Stop hosting the server.", arg -> {
net.closeServer();
if(lastTask != null) lastTask.cancel();