Allow custom whitelist messages

This commit is contained in:
VenkSociety 2019-08-05 16:52:08 +10:00
parent 6e279952ff
commit c0ee86e126
2 changed files with 3 additions and 1 deletions

View File

@ -39,7 +39,7 @@ namespace MCGalaxy.Core {
if (!CheckTempban(p)) return false;
if (Server.Config.WhitelistedOnly && !Server.whiteList.Contains(p.name)) {
p.Leave(null, "This is a private server!", true);
p.Leave(null, Server.Config.DefaultWhitelistMessage, true);
return false;
}

View File

@ -237,6 +237,8 @@ namespace MCGalaxy {
public string DefaultDemoteMessage = "&4DEMOTED! &6We're sorry for your loss. Good luck on your future endeavors! &1:'(";
[ConfigString("custom-restart-message", "Messages", "Server restarted. Sign in again and rejoin.")]
public string DefaultRestartMessage = "Server restarted. Sign in again and rejoin.";
[ConfigString("custom-whitelist-message", "Messages", "This is a private server!")]
public string DefaultWhitelistMessage = "This is a private server!";
static readonly bool[] defLogLevels = new bool[] {
true,true,true,true,true,true, true,true,true,