Refactor SendMailSSL, rename 'stoping' to 'stopping',
- Refactor SendMailSSL into smaller portions and with proper exception handling (do not catch the Exception superclass and do not nest try-catch blocks; always pass on the exception type and message) - Clean prose in config.yml
This commit is contained in:
parent
874d7cd59f
commit
02c366637e
@ -9,15 +9,16 @@ public class AuthMeServerStop extends Thread {
|
|||||||
|
|
||||||
private AuthMe plugin;
|
private AuthMe plugin;
|
||||||
|
|
||||||
public AuthMeServerStop(AuthMe plugin)
|
public AuthMeServerStop(AuthMe plugin) {
|
||||||
{
|
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void run() {
|
public void run() {
|
||||||
// TODO: add a MessageKey
|
// TODO: add a MessageKey
|
||||||
if (Settings.kickPlayersBeforeStoping)
|
if (Settings.kickPlayersBeforeStopping) {
|
||||||
for (Player p : plugin.getServer().getOnlinePlayers())
|
for (Player p : plugin.getServer().getOnlinePlayers()) {
|
||||||
p.kickPlayer("Server is restarting");
|
p.kickPlayer("Server is restarting");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import fr.xephi.authme.ImageGenerator;
|
|||||||
import fr.xephi.authme.cache.auth.PlayerAuth;
|
import fr.xephi.authme.cache.auth.PlayerAuth;
|
||||||
import fr.xephi.authme.settings.Settings;
|
import fr.xephi.authme.settings.Settings;
|
||||||
|
|
||||||
|
import fr.xephi.authme.util.StringUtils;
|
||||||
import org.apache.commons.mail.DefaultAuthenticator;
|
import org.apache.commons.mail.DefaultAuthenticator;
|
||||||
import org.apache.commons.mail.EmailException;
|
import org.apache.commons.mail.EmailException;
|
||||||
import org.apache.commons.mail.HtmlEmail;
|
import org.apache.commons.mail.HtmlEmail;
|
||||||
@ -15,130 +16,153 @@ import javax.activation.DataSource;
|
|||||||
import javax.activation.FileDataSource;
|
import javax.activation.FileDataSource;
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
import java.security.Security;
|
import java.security.Security;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Xephi59
|
* @author Xephi59
|
||||||
* @version $Revision: 1.0 $
|
|
||||||
*/
|
*/
|
||||||
public class SendMailSSL {
|
public class SendMailSSL {
|
||||||
|
|
||||||
public final AuthMe plugin;
|
private final AuthMe plugin;
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor for SendMailSSL.
|
|
||||||
*
|
|
||||||
* @param plugin AuthMe
|
|
||||||
*/
|
|
||||||
public SendMailSSL(AuthMe plugin) {
|
public SendMailSSL(AuthMe plugin) {
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Method main.
|
|
||||||
*
|
|
||||||
* @param auth PlayerAuth
|
|
||||||
* @param newPass String
|
|
||||||
*/
|
|
||||||
public void main(final PlayerAuth auth, final String newPass) {
|
public void main(final PlayerAuth auth, final String newPass) {
|
||||||
String senderName;
|
|
||||||
|
|
||||||
if (Settings.getmailSenderName == null || Settings.getmailSenderName.isEmpty()) {
|
|
||||||
senderName = Settings.getmailAccount;
|
|
||||||
} else {
|
|
||||||
senderName = Settings.getmailSenderName;
|
|
||||||
}
|
|
||||||
|
|
||||||
final String sender = senderName;
|
|
||||||
final int port = Settings.getMailPort;
|
final int port = Settings.getMailPort;
|
||||||
final String acc = Settings.getmailAccount;
|
final String mailText = replaceMailTags(Settings.getMailText, plugin, auth, newPass);
|
||||||
final String subject = Settings.getMailSubject;
|
|
||||||
final String smtp = Settings.getmailSMTP;
|
|
||||||
final String password = Settings.getmailPassword;
|
|
||||||
final String mailText = Settings.getMailText.replace("<playername />", auth.getNickname()).replace("<servername />", plugin.getServer().getServerName()).replace("<generatedpass />", newPass);
|
|
||||||
final String mail = auth.getEmail();
|
|
||||||
Bukkit.getScheduler().runTaskAsynchronously(plugin, new Runnable() {
|
Bukkit.getScheduler().runTaskAsynchronously(plugin, new Runnable() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
|
||||||
|
HtmlEmail email;
|
||||||
try {
|
try {
|
||||||
Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
|
email = initializeMail(auth);
|
||||||
HtmlEmail email = new HtmlEmail();
|
setPropertiesForPort(port, email);
|
||||||
email.setSmtpPort(port);
|
} catch (EmailException e) {
|
||||||
email.setHostName(smtp);
|
ConsoleLogger.showError("Failed to create email with the given settings: "
|
||||||
email.addTo(mail);
|
+ StringUtils.formatException(e));
|
||||||
email.setFrom(acc, sender);
|
return;
|
||||||
email.setSubject(subject);
|
}
|
||||||
if (acc != null && !acc.isEmpty() && password != null && !password.isEmpty())
|
|
||||||
email.setAuthenticator(new DefaultAuthenticator(acc, !Settings.emailOauth2Token.isEmpty() ? "" : password));
|
|
||||||
switch (port) {
|
|
||||||
case 587:
|
|
||||||
email.setStartTLSEnabled(true);
|
|
||||||
email.setStartTLSRequired(true);
|
|
||||||
if (!Settings.emailOauth2Token.isEmpty())
|
|
||||||
{
|
|
||||||
if (Security.getProvider("Google OAuth2 Provider") == null)
|
|
||||||
Security.addProvider(new OAuth2Provider());
|
|
||||||
email.getMailSession().getProperties().setProperty("mail.smtp.starttls.enable", "true");
|
|
||||||
email.getMailSession().getProperties().setProperty("mail.smtp.starttls.required", "true");
|
|
||||||
email.getMailSession().getProperties().setProperty("mail.smtp.sasl.enable", "true");
|
|
||||||
email.getMailSession().getProperties().setProperty("mail.smtp.sasl.mechanisms", "XOAUTH2");
|
|
||||||
email.getMailSession().getProperties().setProperty(OAuth2SaslClientFactory.OAUTH_TOKEN_PROP, password);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 25:
|
|
||||||
email.setStartTLSEnabled(true);
|
|
||||||
email.setSSLCheckServerIdentity(true);
|
|
||||||
break;
|
|
||||||
case 465:
|
|
||||||
email.setSSLOnConnect(true);
|
|
||||||
email.setSSLCheckServerIdentity(true);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
email.setStartTLSEnabled(true);
|
|
||||||
email.setSSLOnConnect(true);
|
|
||||||
email.setSSLCheckServerIdentity(true);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
String content = mailText;
|
|
||||||
// Generate an image ?
|
|
||||||
File file = null;
|
|
||||||
if (Settings.generateImage) {
|
|
||||||
try {
|
|
||||||
ImageGenerator gen = new ImageGenerator(newPass);
|
|
||||||
file = new File(plugin.getDataFolder() + File.separator + auth.getNickname() + "_new_pass.jpg");
|
|
||||||
ImageIO.write(gen.generateImage(), "jpg", file);
|
|
||||||
DataSource source = new FileDataSource(file);
|
|
||||||
String tag = email.embed(source, auth.getNickname() + "_new_pass.jpg");
|
|
||||||
content = content.replace("%image%", "<img src=\"cid:" + tag + "\">");
|
|
||||||
} catch (Exception e) {
|
|
||||||
ConsoleLogger.showError("Unable to send new password as image! Using normal text! Dest: " + mail);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
email.setHtmlMsg(content);
|
|
||||||
email.setTextMsg(content);
|
|
||||||
} catch (EmailException e)
|
|
||||||
{
|
|
||||||
ConsoleLogger.showError("Your email.html config contains some error and cannot be send!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
email.send();
|
|
||||||
} catch (Exception e) {
|
|
||||||
ConsoleLogger.showError("Fail to send a mail to " + mail + " cause " + e.getLocalizedMessage());
|
|
||||||
}
|
|
||||||
if (file != null)
|
|
||||||
//noinspection ResultOfMethodCallIgnored
|
|
||||||
file.delete();
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
String content = mailText;
|
||||||
// Print the stack trace
|
// Generate an image?
|
||||||
e.printStackTrace();
|
File file = null;
|
||||||
ConsoleLogger.showError("Some error occurred while trying to send a email to " + mail);
|
if (Settings.generateImage) {
|
||||||
|
try {
|
||||||
|
file = generateImage(auth, plugin, newPass);
|
||||||
|
content = embedImageIntoEmailContent(file, email, content);
|
||||||
|
} catch (IOException | EmailException e) {
|
||||||
|
ConsoleLogger.showError("Unable to send new password as image for email "
|
||||||
|
+ auth.getEmail() + ": " + StringUtils.formatException(e));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sendEmail(content, email);
|
||||||
|
if (file != null) {
|
||||||
|
file.delete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static File generateImage(PlayerAuth auth, AuthMe plugin, String newPass) throws IOException {
|
||||||
|
ImageGenerator gen = new ImageGenerator(newPass);
|
||||||
|
File file = new File(plugin.getDataFolder() + File.separator + auth.getNickname() + "_new_pass.jpg");
|
||||||
|
ImageIO.write(gen.generateImage(), "jpg", file);
|
||||||
|
return file;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String embedImageIntoEmailContent(File image, HtmlEmail email, String content)
|
||||||
|
throws EmailException {
|
||||||
|
DataSource source = new FileDataSource(image);
|
||||||
|
String tag = email.embed(source, image.getName());
|
||||||
|
return content.replace("<image />", "<img src=\"cid:" + tag + "\">");
|
||||||
|
}
|
||||||
|
|
||||||
|
private static HtmlEmail initializeMail(PlayerAuth auth) throws EmailException {
|
||||||
|
String senderName;
|
||||||
|
if (Settings.getmailSenderName == null || Settings.getmailSenderName.isEmpty()) {
|
||||||
|
senderName = Settings.getmailAccount;
|
||||||
|
} else {
|
||||||
|
senderName = Settings.getmailSenderName;
|
||||||
|
}
|
||||||
|
String senderMail = Settings.getmailAccount;
|
||||||
|
String mailPassword = Settings.getmailPassword;
|
||||||
|
|
||||||
|
HtmlEmail email = new HtmlEmail();
|
||||||
|
email.setSmtpPort(Settings.getMailPort);
|
||||||
|
email.setHostName(Settings.getmailSMTP);
|
||||||
|
email.addTo(auth.getEmail());
|
||||||
|
email.setFrom(senderMail, senderName);
|
||||||
|
email.setSubject(Settings.getMailSubject);
|
||||||
|
if (!StringUtils.isEmpty(senderMail) && !StringUtils.isEmpty(mailPassword)) {
|
||||||
|
String password = !Settings.emailOauth2Token.isEmpty() ? "" : mailPassword;
|
||||||
|
email.setAuthenticator(new DefaultAuthenticator(senderMail, password));
|
||||||
|
}
|
||||||
|
return email;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean sendEmail(String content, HtmlEmail email) {
|
||||||
|
try {
|
||||||
|
email.setHtmlMsg(content);
|
||||||
|
email.setTextMsg(content);
|
||||||
|
} catch (EmailException e) {
|
||||||
|
ConsoleLogger.showError("Your email.html config contains an error and cannot be sent: "
|
||||||
|
+ StringUtils.formatException(e));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
email.send();
|
||||||
|
return true;
|
||||||
|
} catch (EmailException e) {
|
||||||
|
ConsoleLogger.showError("Failed to send a mail to " + email.getToAddresses() + ": " + e.getMessage());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String replaceMailTags(String mailText, AuthMe plugin, PlayerAuth auth, String newPass) {
|
||||||
|
return mailText
|
||||||
|
.replace("<playername />", auth.getNickname())
|
||||||
|
.replace("<servername />", plugin.getServer().getServerName())
|
||||||
|
.replace("<generatedpass />", newPass);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void setPropertiesForPort(int port, HtmlEmail email) throws EmailException {
|
||||||
|
switch (port) {
|
||||||
|
case 587:
|
||||||
|
email.setStartTLSEnabled(true);
|
||||||
|
email.setStartTLSRequired(true);
|
||||||
|
if (!Settings.emailOauth2Token.isEmpty()) {
|
||||||
|
if (Security.getProvider("Google OAuth2 Provider") == null) {
|
||||||
|
Security.addProvider(new OAuth2Provider());
|
||||||
|
}
|
||||||
|
|
||||||
|
Properties mailProperties = email.getMailSession().getProperties();
|
||||||
|
mailProperties.setProperty("mail.smtp.starttls.enable", "true");
|
||||||
|
mailProperties.setProperty("mail.smtp.starttls.required", "true");
|
||||||
|
mailProperties.setProperty("mail.smtp.sasl.enable", "true");
|
||||||
|
mailProperties.setProperty("mail.smtp.sasl.mechanisms", "XOAUTH2");
|
||||||
|
mailProperties.setProperty(OAuth2SaslClientFactory.OAUTH_TOKEN_PROP, Settings.getmailPassword);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 25:
|
||||||
|
email.setStartTLSEnabled(true);
|
||||||
|
email.setSSLCheckServerIdentity(true);
|
||||||
|
break;
|
||||||
|
case 465:
|
||||||
|
email.setSSLOnConnect(true);
|
||||||
|
email.setSSLCheckServerIdentity(true);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
email.setStartTLSEnabled(true);
|
||||||
|
email.setSSLOnConnect(true);
|
||||||
|
email.setSSLCheckServerIdentity(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -79,7 +79,7 @@ public final class Settings {
|
|||||||
enableProtection, enableAntiBot, recallEmail, useWelcomeMessage,
|
enableProtection, enableAntiBot, recallEmail, useWelcomeMessage,
|
||||||
broadcastWelcomeMessage, forceRegKick, forceRegLogin,
|
broadcastWelcomeMessage, forceRegKick, forceRegLogin,
|
||||||
checkVeryGames, delayJoinLeaveMessages, noTeleport, applyBlindEffect,
|
checkVeryGames, delayJoinLeaveMessages, noTeleport, applyBlindEffect,
|
||||||
kickPlayersBeforeStoping,
|
kickPlayersBeforeStopping,
|
||||||
customAttributes, generateImage, isRemoveSpeedEnabled, preventOtherCase;
|
customAttributes, generateImage, isRemoveSpeedEnabled, preventOtherCase;
|
||||||
public static String helpHeader, getNickRegex, getUnloggedinGroup, getMySQLHost,
|
public static String helpHeader, getNickRegex, getUnloggedinGroup, getMySQLHost,
|
||||||
getMySQLPort, getMySQLUsername, getMySQLPassword, getMySQLDatabase,
|
getMySQLPort, getMySQLUsername, getMySQLPassword, getMySQLDatabase,
|
||||||
@ -301,7 +301,7 @@ public final class Settings {
|
|||||||
customAttributes = configFile.getBoolean("Hooks.customAttributes");
|
customAttributes = configFile.getBoolean("Hooks.customAttributes");
|
||||||
generateImage = configFile.getBoolean("Email.generateImage", false);
|
generateImage = configFile.getBoolean("Email.generateImage", false);
|
||||||
preventOtherCase = configFile.getBoolean("settings.preventOtherCase", false);
|
preventOtherCase = configFile.getBoolean("settings.preventOtherCase", false);
|
||||||
kickPlayersBeforeStoping = configFile.getBoolean("Security.stop.kickPlayersBeforeStoping", true);
|
kickPlayersBeforeStopping = configFile.getBoolean("Security.stop.kickPlayersBeforeStopping", true);
|
||||||
emailOauth2Token = configFile.getString("Email.emailOauth2Token", "");
|
emailOauth2Token = configFile.getString("Email.emailOauth2Token", "");
|
||||||
|
|
||||||
// Load the welcome message
|
// Load the welcome message
|
||||||
@ -730,8 +730,8 @@ public final class Settings {
|
|||||||
ConsoleLogger.showError("Remove Email.mailText from config, we now use the email.html file");
|
ConsoleLogger.showError("Remove Email.mailText from config, we now use the email.html file");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!contains("Security.stop.kickPlayersBeforeStoping")) {
|
if (!contains("Security.stop.kickPlayersBeforeStopping")) {
|
||||||
set("Security.stop.kickPlayersBeforeStoping", true);
|
set("Security.stop.kickPlayersBeforeStopping", true);
|
||||||
changes = true;
|
changes = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -102,7 +102,7 @@ settings:
|
|||||||
# - playername;127.0.0.1
|
# - playername;127.0.0.1
|
||||||
AllowedRestrictedUser:
|
AllowedRestrictedUser:
|
||||||
- playername;127.0.0.1
|
- playername;127.0.0.1
|
||||||
# Should unregistered players be kicked immediatly?
|
# Should unregistered players be kicked immediately?
|
||||||
kickNonRegistered: false
|
kickNonRegistered: false
|
||||||
# Should players be kicked on wrong password?
|
# Should players be kicked on wrong password?
|
||||||
kickOnWrongPassword: false
|
kickOnWrongPassword: false
|
||||||
@ -150,7 +150,7 @@ settings:
|
|||||||
maxJoinPerIp: 0
|
maxJoinPerIp: 0
|
||||||
# AuthMe will NEVER teleport players !
|
# AuthMe will NEVER teleport players !
|
||||||
noTeleport: false
|
noTeleport: false
|
||||||
# Regex sintax for allowed Chars in passwords.
|
# Regex syntax for allowed Chars in passwords.
|
||||||
allowedPasswordCharacters: '[\x21-\x7E]*'
|
allowedPasswordCharacters: '[\x21-\x7E]*'
|
||||||
GameMode:
|
GameMode:
|
||||||
# ForceSurvivalMode to player when join ?
|
# ForceSurvivalMode to player when join ?
|
||||||
@ -158,7 +158,7 @@ settings:
|
|||||||
# if player join with CreativeMode and ForceSurvivalMode: true
|
# if player join with CreativeMode and ForceSurvivalMode: true
|
||||||
# inventory will be wipped
|
# inventory will be wipped
|
||||||
ResetInventoryIfCreative: false
|
ResetInventoryIfCreative: false
|
||||||
# Do we need to force the survival mode ONLY after /login process ?
|
# Do we need to force the survival mode ONLY after /login process?
|
||||||
ForceOnlyAfterLogin: false
|
ForceOnlyAfterLogin: false
|
||||||
security:
|
security:
|
||||||
# minimum Length of password
|
# minimum Length of password
|
||||||
@ -192,9 +192,9 @@ settings:
|
|||||||
passwordHash: SHA256
|
passwordHash: SHA256
|
||||||
# salt length for the SALTED2MD5 MD5(MD5(password)+salt)
|
# salt length for the SALTED2MD5 MD5(MD5(password)+salt)
|
||||||
doubleMD5SaltLength: 8
|
doubleMD5SaltLength: 8
|
||||||
# If password checking return false , do we need to check with all
|
# If password checking return false, do we need to check with all
|
||||||
# other password algorithm to check an old password ?
|
# other password algorithm to check an old password?
|
||||||
# AuthMe will update the password to the new passwordHash !
|
# AuthMe will update the password to the new passwordHash!
|
||||||
supportOldPasswordHash: false
|
supportOldPasswordHash: false
|
||||||
# Cancel unsafe passwords for being used, put them on lowercase!
|
# Cancel unsafe passwords for being used, put them on lowercase!
|
||||||
#unsafePasswords:
|
#unsafePasswords:
|
||||||
@ -215,19 +215,19 @@ settings:
|
|||||||
# Only registered and logged in players can play.
|
# Only registered and logged in players can play.
|
||||||
# See restrictions for exceptions
|
# See restrictions for exceptions
|
||||||
force: true
|
force: true
|
||||||
# Does we replace password registration by an Email registration method ?
|
# Does we replace password registration by an Email registration method?
|
||||||
enableEmailRegistrationSystem: false
|
enableEmailRegistrationSystem: false
|
||||||
# Enable double check of email when you register
|
# Enable double check of email when you register
|
||||||
# when it's true, registration require that kind of command:
|
# when it's true, registration require that kind of command:
|
||||||
# /register <email> <confirmEmail>
|
# /register <email> <confirmEmail>
|
||||||
doubleEmailCheck: false
|
doubleEmailCheck: false
|
||||||
# Do we force kicking player after a successful registration ?
|
# Do we force kicking player after a successful registration?
|
||||||
# Do not use with login feature below
|
# Do not use with login feature below
|
||||||
forceKickAfterRegister: false
|
forceKickAfterRegister: false
|
||||||
# Does AuthMe need to enforce a /login after a successful registration ?
|
# Does AuthMe need to enforce a /login after a successful registration?
|
||||||
forceLoginAfterRegister: false
|
forceLoginAfterRegister: false
|
||||||
unrestrictions:
|
unrestrictions:
|
||||||
# below you can list all your account name, that
|
# below you can list all account names that
|
||||||
# AuthMe will ignore for registration or login, configure it
|
# AuthMe will ignore for registration or login, configure it
|
||||||
# at your own risk!! Remember that if you are going to add
|
# at your own risk!! Remember that if you are going to add
|
||||||
# nickname with [], you have to delimit name with ' '.
|
# nickname with [], you have to delimit name with ' '.
|
||||||
@ -255,10 +255,10 @@ settings:
|
|||||||
broadcastWelcomeMessage: false
|
broadcastWelcomeMessage: false
|
||||||
# Do we need to delay the join/leave message to be displayed only when the player is authenticated ?
|
# Do we need to delay the join/leave message to be displayed only when the player is authenticated ?
|
||||||
delayJoinLeaveMessages: true
|
delayJoinLeaveMessages: true
|
||||||
# Do we need to add potion effect Blinding before login/register ?
|
# Do we need to add potion effect Blinding before login/register?
|
||||||
applyBlindEffect: false
|
applyBlindEffect: false
|
||||||
# Do we need to prevent people to login without another case ?
|
# Do we need to prevent people to login with another case?
|
||||||
# Xephi is registered, also Xephi can login, but not XEPHI/xephi/XePhI
|
# If Xephi is registered, then Xephi can login, but not XEPHI/xephi/XePhI
|
||||||
preventOtherCase: false
|
preventOtherCase: false
|
||||||
ExternalBoardOptions:
|
ExternalBoardOptions:
|
||||||
# MySQL column for the salt , needed for some forum/cms support
|
# MySQL column for the salt , needed for some forum/cms support
|
||||||
@ -317,9 +317,9 @@ Security:
|
|||||||
# Captcha length
|
# Captcha length
|
||||||
captchaLength: 5
|
captchaLength: 5
|
||||||
stop:
|
stop:
|
||||||
# Kick players before stoping the server, that allow us to save position of players, and all needed
|
# Kick players before stopping the server, that allow us to save position of players, and all needed
|
||||||
# informations correctly without any corruption.
|
# information correctly without any corruption.
|
||||||
kickPlayersBeforeStoping: true
|
kickPlayersBeforeStopping: true
|
||||||
Converter:
|
Converter:
|
||||||
Rakamak:
|
Rakamak:
|
||||||
# Rakamak file name
|
# Rakamak file name
|
||||||
@ -350,7 +350,7 @@ Email:
|
|||||||
mailText: 'Dear <playername>, <br /><br /> This is your new AuthMe password for the server <br /><br /> <servername> : <br /><br /> <generatedpass><br /><image><br />Do not forget to change password after login! <br /> /changepassword <generatedpass> newPassword'
|
mailText: 'Dear <playername>, <br /><br /> This is your new AuthMe password for the server <br /><br /> <servername> : <br /><br /> <generatedpass><br /><image><br />Do not forget to change password after login! <br /> /changepassword <generatedpass> newPassword'
|
||||||
# Like maxRegPerIp but with email
|
# Like maxRegPerIp but with email
|
||||||
maxRegPerEmail: 1
|
maxRegPerEmail: 1
|
||||||
# Recall players to add an email ?
|
# Recall players to add an email?
|
||||||
recallPlayers: false
|
recallPlayers: false
|
||||||
# Delay in minute for the recall scheduler
|
# Delay in minute for the recall scheduler
|
||||||
delayRecall: 5
|
delayRecall: 5
|
||||||
@ -359,35 +359,35 @@ Email:
|
|||||||
- 10minutemail.com
|
- 10minutemail.com
|
||||||
# WhiteList only these domains for emails
|
# WhiteList only these domains for emails
|
||||||
emailWhitelisted: []
|
emailWhitelisted: []
|
||||||
# Do we need to send new password draw in an image ?
|
# Do we need to send new password draw in an image?
|
||||||
generateImage: false
|
generateImage: false
|
||||||
Hooks:
|
Hooks:
|
||||||
# Do we need to hook with multiverse for spawn checking?
|
# Do we need to hook with multiverse for spawn checking?
|
||||||
multiverse: true
|
multiverse: true
|
||||||
# Do we need to hook with BungeeCord for get the real Player ip ?
|
# Do we need to hook with BungeeCord for get the real Player ip?
|
||||||
bungeecord: false
|
bungeecord: false
|
||||||
# Do we need to disable Essentials SocialSpy on join ?
|
# Do we need to disable Essentials SocialSpy on join?
|
||||||
disableSocialSpy: true
|
disableSocialSpy: true
|
||||||
# Do we need to force /motd Essentials command on join ?
|
# Do we need to force /motd Essentials command on join?
|
||||||
useEssentialsMotd: false
|
useEssentialsMotd: false
|
||||||
# Do we need to cache custom Attributes ?
|
# Do we need to cache custom Attributes?
|
||||||
customAttributes: false
|
customAttributes: false
|
||||||
Purge:
|
Purge:
|
||||||
# On Enable , does AuthMe need to purge automatically old accounts unused ?
|
# If enabled, AuthMe automatically purges old, unused accounts
|
||||||
useAutoPurge: false
|
useAutoPurge: false
|
||||||
# Number of Days an account become Unused
|
# Number of Days an account become Unused
|
||||||
daysBeforeRemovePlayer: 60
|
daysBeforeRemovePlayer: 60
|
||||||
# Do we need to remove the player.dat file during purge process ?
|
# Do we need to remove the player.dat file during purge process?
|
||||||
removePlayerDat: false
|
removePlayerDat: false
|
||||||
# Do we need to remove the Essentials/users/player.yml file during purge process ?
|
# Do we need to remove the Essentials/users/player.yml file during purge process?
|
||||||
removeEssentialsFile: false
|
removeEssentialsFile: false
|
||||||
# World where are players.dat stores
|
# World where are players.dat stores
|
||||||
defaultWorld: 'world'
|
defaultWorld: 'world'
|
||||||
# Do we need to remove LimitedCreative/inventories/player.yml , player_creative.yml files during purge process ?
|
# Do we need to remove LimitedCreative/inventories/player.yml, player_creative.yml files during purge process ?
|
||||||
removeLimitedCreativesInventories: false
|
removeLimitedCreativesInventories: false
|
||||||
# Do we need to remove the AntiXRayData/PlayerData/player file during purge process ?
|
# Do we need to remove the AntiXRayData/PlayerData/player file during purge process?
|
||||||
removeAntiXRayFile: false
|
removeAntiXRayFile: false
|
||||||
# Do we need to remove permissions ?
|
# Do we need to remove permissions?
|
||||||
removePermissions: false
|
removePermissions: false
|
||||||
Protection:
|
Protection:
|
||||||
# Enable some servers protection ( country based login, antibot )
|
# Enable some servers protection ( country based login, antibot )
|
||||||
@ -397,7 +397,7 @@ Protection:
|
|||||||
countries:
|
countries:
|
||||||
- 'US'
|
- 'US'
|
||||||
- 'GB'
|
- 'GB'
|
||||||
# Countries blacklisted automatically ( without any needed to enable protection )
|
# Countries blacklisted automatically (without any needed to enable protection)
|
||||||
# PLEASE USE QUOTES!
|
# PLEASE USE QUOTES!
|
||||||
countriesBlacklist:
|
countriesBlacklist:
|
||||||
- 'A1'
|
- 'A1'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user