Added server MOTD

This commit is contained in:
Anuken
2020-01-02 22:09:33 -05:00
parent 5f3c10e397
commit 7fa61eaf3b
2 changed files with 6 additions and 1 deletions

View File

@ -589,6 +589,10 @@ public class NetServer implements ApplicationListener{
if(Config.showConnectMessages.bool()) Call.sendMessage("[accent]" + player.name + "[accent] has connected.");
Log.info("&lm[{1}] &y{0} has connected. ", player.name, player.uuid);
if(!Config.motd.string().equalsIgnoreCase("off")){
player.sendMessage(Config.motd.string());
}
Events.fire(new PlayerJoin(player));
}

View File

@ -330,7 +330,8 @@ public class Administration{
socketInputPort("The port for socket input.", 6859, () -> Events.fire(Trigger.socketConfigChanged)),
socketInputAddress("The bind address for socket input.", "localhost", () -> Events.fire(Trigger.socketConfigChanged)),
allowCustomClients("Whether custom clients are allowed to connect.", !headless, "allow-custom"),
whitelist("Whether the whitelist is used.", false);
whitelist("Whether the whitelist is used.", false),
motd("The message displayed to people on connection.", "off");
public static final Config[] all = values();