Add a way to kick players before a server stop

This commit is contained in:
Xephi
2015-12-21 12:04:28 +01:00
parent 5c2547cd82
commit e272a3bfb5
4 changed files with 42 additions and 0 deletions
@@ -79,6 +79,7 @@ public final class Settings {
enableProtection, enableAntiBot, recallEmail, useWelcomeMessage,
broadcastWelcomeMessage, forceRegKick, forceRegLogin,
checkVeryGames, delayJoinLeaveMessages, noTeleport, applyBlindEffect,
kickPlayersBeforeStoping,
customAttributes, generateImage, isRemoveSpeedEnabled, preventOtherCase;
public static String helpHeader, getNickRegex, getUnloggedinGroup, getMySQLHost,
getMySQLPort, getMySQLUsername, getMySQLPassword, getMySQLDatabase,
@@ -300,6 +301,7 @@ public final class Settings {
customAttributes = configFile.getBoolean("Hooks.customAttributes");
generateImage = configFile.getBoolean("Email.generateImage", false);
preventOtherCase = configFile.getBoolean("settings.preventOtherCase", false);
kickPlayersBeforeStoping = configFile.getBoolean("Security.stop.kickPlayersBeforeStoping", true);
// Load the welcome message
getWelcomeMessage();
@@ -727,6 +729,11 @@ public final class Settings {
ConsoleLogger.showError("Remove Email.mailText from config, we now use the email.html file");
}
if (!contains("Security.stop.kickPlayersBeforeStoping")) {
set("Security.stop.kickPlayersBeforeStoping", true);
changed = true;
}
if (changes) {
plugin.getLogger().warning("Merged new Config Options - I'm not an error, please don't report me");
plugin.getLogger().warning("Please check your config.yml file for new configs!");