|
|
|
@@ -48,46 +48,46 @@ public final class Settings extends YamlConfiguration {
|
|
|
|
|
// Due to compatibility issues with plugins like FactionsChat
|
|
|
|
|
public static Boolean isChatAllowed;
|
|
|
|
|
public static boolean isPermissionCheckEnabled, isRegistrationEnabled,
|
|
|
|
|
isForcedRegistrationEnabled, isTeleportToSpawnEnabled,
|
|
|
|
|
isSessionsEnabled, isAllowRestrictedIp,
|
|
|
|
|
isMovementAllowed, isKickNonRegisteredEnabled,
|
|
|
|
|
isForceSingleSessionEnabled, isForceSpawnLocOnJoinEnabled,
|
|
|
|
|
isSaveQuitLocationEnabled, isForceSurvivalModeEnabled,
|
|
|
|
|
isResetInventoryIfCreative, isCachingEnabled,
|
|
|
|
|
isKickOnWrongPasswordEnabled, getEnablePasswordVerifier,
|
|
|
|
|
protectInventoryBeforeLogInEnabled, isBackupActivated,
|
|
|
|
|
isBackupOnStart, isBackupOnStop, isStopEnabled, reloadSupport,
|
|
|
|
|
rakamakUseIp, noConsoleSpam, removePassword, displayOtherAccounts,
|
|
|
|
|
useCaptcha, emailRegistration, multiverse, bungee,
|
|
|
|
|
banUnsafeIp, doubleEmailCheck, sessionExpireOnIpChange,
|
|
|
|
|
disableSocialSpy, forceOnlyAfterLogin, useEssentialsMotd, usePurge,
|
|
|
|
|
purgePlayerDat, purgeEssentialsFile, supportOldPassword,
|
|
|
|
|
purgeLimitedCreative, purgeAntiXray, purgePermissions,
|
|
|
|
|
enableProtection, enableAntiBot, recallEmail, useWelcomeMessage,
|
|
|
|
|
broadcastWelcomeMessage, forceRegKick, forceRegLogin,
|
|
|
|
|
checkVeryGames, delayJoinLeaveMessages, noTeleport, applyBlindEffect,
|
|
|
|
|
customAttributes, generateImage, isRemoveSpeedEnabled, isMySQLWebsite;
|
|
|
|
|
isForcedRegistrationEnabled, isTeleportToSpawnEnabled,
|
|
|
|
|
isSessionsEnabled, isAllowRestrictedIp,
|
|
|
|
|
isMovementAllowed, isKickNonRegisteredEnabled,
|
|
|
|
|
isForceSingleSessionEnabled, isForceSpawnLocOnJoinEnabled,
|
|
|
|
|
isSaveQuitLocationEnabled, isForceSurvivalModeEnabled,
|
|
|
|
|
isResetInventoryIfCreative, isCachingEnabled,
|
|
|
|
|
isKickOnWrongPasswordEnabled, getEnablePasswordVerifier,
|
|
|
|
|
protectInventoryBeforeLogInEnabled, isBackupActivated,
|
|
|
|
|
isBackupOnStart, isBackupOnStop, isStopEnabled, reloadSupport,
|
|
|
|
|
rakamakUseIp, noConsoleSpam, removePassword, displayOtherAccounts,
|
|
|
|
|
useCaptcha, emailRegistration, multiverse, bungee,
|
|
|
|
|
banUnsafeIp, doubleEmailCheck, sessionExpireOnIpChange,
|
|
|
|
|
disableSocialSpy, forceOnlyAfterLogin, useEssentialsMotd, usePurge,
|
|
|
|
|
purgePlayerDat, purgeEssentialsFile, supportOldPassword,
|
|
|
|
|
purgeLimitedCreative, purgeAntiXray, purgePermissions,
|
|
|
|
|
enableProtection, enableAntiBot, recallEmail, useWelcomeMessage,
|
|
|
|
|
broadcastWelcomeMessage, forceRegKick, forceRegLogin,
|
|
|
|
|
checkVeryGames, delayJoinLeaveMessages, noTeleport, applyBlindEffect,
|
|
|
|
|
customAttributes, generateImage, isRemoveSpeedEnabled, isMySQLWebsite;
|
|
|
|
|
public static String getNickRegex, getUnloggedinGroup, getMySQLHost,
|
|
|
|
|
getMySQLPort, getMySQLUsername, getMySQLPassword, getMySQLDatabase,
|
|
|
|
|
getMySQLTablename, getMySQLColumnName, getMySQLColumnPassword,
|
|
|
|
|
getMySQLColumnIp, getMySQLColumnLastLogin, getMySQLColumnSalt,
|
|
|
|
|
getMySQLColumnGroup, getMySQLColumnEmail, unRegisteredGroup,
|
|
|
|
|
backupWindowsPath, getRegisteredGroup,
|
|
|
|
|
messagesLanguage, getMySQLlastlocX, getMySQLlastlocY,
|
|
|
|
|
getMySQLlastlocZ, rakamakUsers, rakamakUsersIp, getmailAccount,
|
|
|
|
|
getmailPassword, getmailSMTP, getMySQLColumnId, getmailSenderName,
|
|
|
|
|
getMailSubject, getMailText, getMySQLlastlocWorld, defaultWorld,
|
|
|
|
|
getPhpbbPrefix, getWordPressPrefix, getMySQLColumnLogged,
|
|
|
|
|
spawnPriority, crazyloginFileName, getPassRegex,
|
|
|
|
|
getMySQLColumnRealName;
|
|
|
|
|
getMySQLPort, getMySQLUsername, getMySQLPassword, getMySQLDatabase,
|
|
|
|
|
getMySQLTablename, getMySQLColumnName, getMySQLColumnPassword,
|
|
|
|
|
getMySQLColumnIp, getMySQLColumnLastLogin, getMySQLColumnSalt,
|
|
|
|
|
getMySQLColumnGroup, getMySQLColumnEmail, unRegisteredGroup,
|
|
|
|
|
backupWindowsPath, getRegisteredGroup,
|
|
|
|
|
messagesLanguage, getMySQLlastlocX, getMySQLlastlocY,
|
|
|
|
|
getMySQLlastlocZ, rakamakUsers, rakamakUsersIp, getmailAccount,
|
|
|
|
|
getmailPassword, getmailSMTP, getMySQLColumnId, getmailSenderName,
|
|
|
|
|
getMailSubject, getMailText, getMySQLlastlocWorld, defaultWorld,
|
|
|
|
|
getPhpbbPrefix, getWordPressPrefix, getMySQLColumnLogged,
|
|
|
|
|
spawnPriority, crazyloginFileName, getPassRegex,
|
|
|
|
|
getMySQLColumnRealName;
|
|
|
|
|
public static int getWarnMessageInterval, getSessionTimeout,
|
|
|
|
|
getRegistrationTimeout, getMaxNickLength, getMinNickLength,
|
|
|
|
|
getPasswordMinLen, getMovementRadius, getmaxRegPerIp,
|
|
|
|
|
getNonActivatedGroup, passwordMaxLength, getRecoveryPassLength,
|
|
|
|
|
getMailPort, maxLoginTry, captchaLength, saltLength,
|
|
|
|
|
getmaxRegPerEmail, bCryptLog2Rounds, getPhpbbGroup,
|
|
|
|
|
antiBotSensibility, antiBotDuration, delayRecall, getMaxLoginPerIp,
|
|
|
|
|
getMaxJoinPerIp, getMySQLMaxConnections;
|
|
|
|
|
getRegistrationTimeout, getMaxNickLength, getMinNickLength,
|
|
|
|
|
getPasswordMinLen, getMovementRadius, getmaxRegPerIp,
|
|
|
|
|
getNonActivatedGroup, passwordMaxLength, getRecoveryPassLength,
|
|
|
|
|
getMailPort, maxLoginTry, captchaLength, saltLength,
|
|
|
|
|
getmaxRegPerEmail, bCryptLog2Rounds, getPhpbbGroup,
|
|
|
|
|
antiBotSensibility, antiBotDuration, delayRecall, getMaxLoginPerIp,
|
|
|
|
|
getMaxJoinPerIp, getMySQLMaxConnections;
|
|
|
|
|
protected static YamlConfiguration configFile;
|
|
|
|
|
private static AuthMe plugin;
|
|
|
|
|
private static Settings instance;
|
|
|
|
@@ -338,6 +338,7 @@ public final class Settings extends YamlConfiguration {
|
|
|
|
|
*
|
|
|
|
|
* @param name String
|
|
|
|
|
* @param ip String
|
|
|
|
|
*
|
|
|
|
|
* @return boolean
|
|
|
|
|
*/
|
|
|
|
|
public static boolean getRestrictedIp(String name, String ip) {
|
|
|
|
@@ -377,6 +378,7 @@ public final class Settings extends YamlConfiguration {
|
|
|
|
|
* Method checkLang.
|
|
|
|
|
*
|
|
|
|
|
* @param lang String
|
|
|
|
|
*
|
|
|
|
|
* @return String
|
|
|
|
|
*/
|
|
|
|
|
public static String checkLang(String lang) {
|
|
|
|
@@ -442,6 +444,7 @@ public final class Settings extends YamlConfiguration {
|
|
|
|
|
* Method isEmailCorrect.
|
|
|
|
|
*
|
|
|
|
|
* @param email String
|
|
|
|
|
*
|
|
|
|
|
* @return boolean
|
|
|
|
|
*/
|
|
|
|
|
public static boolean isEmailCorrect(String email) {
|
|
|
|
@@ -480,7 +483,7 @@ public final class Settings extends YamlConfiguration {
|
|
|
|
|
changes = true;
|
|
|
|
|
}
|
|
|
|
|
if (configFile.getString("settings.security.passwordHash", "SHA256").toUpperCase().equals("XFSHA1") ||
|
|
|
|
|
configFile.getString("settings.security.passwordHash", "SHA256").toUpperCase().equals("XFSHA256")) {
|
|
|
|
|
configFile.getString("settings.security.passwordHash", "SHA256").toUpperCase().equals("XFSHA256")) {
|
|
|
|
|
set("settings.security.passwordHash", "XENFORO");
|
|
|
|
|
changes = true;
|
|
|
|
|
}
|
|
|
|
@@ -685,7 +688,7 @@ public final class Settings extends YamlConfiguration {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Saves current configuration (plus defaults) to disk.
|
|
|
|
|
* <p>
|
|
|
|
|
* <p/>
|
|
|
|
|
* If defaults and configuration are empty, saves blank file.
|
|
|
|
|
*
|
|
|
|
|
* @return True if saved successfully
|
|
|
|
|