Merge master into '306-command-service'

Conflict:
- HelpCommand.java
This commit is contained in:
ljacqu
2015-12-26 13:01:00 +01:00
6 changed files with 55 additions and 16 deletions
@@ -36,7 +36,8 @@ public class HelpCommand implements ExecutableCommand {
}
}
if (arguments.size() == 1) {
int mappedCommandLevel = foundCommandResult.getCommandDescription().getLabelCount();
if (mappedCommandLevel == 1) {
commandService.outputHelp(sender, result, HelpProvider.SHOW_CHILDREN);
} else {
commandService.outputHelp(sender, result, HelpProvider.ALL_OPTIONS);
@@ -110,7 +110,7 @@ public class HelpProvider {
private static void printAlternatives(CommandDescription command, List<String> correctLabels, List<String> lines) {
// TODO ljacqu 20151219: Need to show alternatives for base labels too? E.g. /r for /register
if (command.getLabels().size() <= 1) {
if (command.getLabels().size() <= 1 || correctLabels.size() <= 1) {
return;
}
@@ -96,6 +96,7 @@ public class SendMailSSL {
int port = Settings.getMailPort;
HtmlEmail email = new HtmlEmail();
email.setCharset(org.apache.commons.mail.EmailConstants.UTF_8);
email.setSmtpPort(port);
email.setHostName(Settings.getmailSMTP);
email.addTo(auth.getEmail());
@@ -129,7 +130,8 @@ public class SendMailSSL {
return mailText.replace("<playername />", auth.getNickname()).replace("<servername />", plugin.getServer().getServerName()).replace("<generatedpass />", newPass);
}
private static void setPropertiesForPort(HtmlEmail email, int port)
@SuppressWarnings("deprecation")
private static void setPropertiesForPort(HtmlEmail email, int port)
throws EmailException {
switch (port) {
case 587:
@@ -168,6 +168,7 @@ public final class Settings {
isForceSingleSessionEnabled = configFile.getBoolean("settings.restrictions.ForceSingleSession", true);
isForceSpawnLocOnJoinEnabled = configFile.getBoolean("settings.restrictions.ForceSpawnLocOnJoinEnabled", false);
isSaveQuitLocationEnabled = configFile.getBoolean("settings.restrictions.SaveQuitLocation", false);
isForceSurvivalModeEnabled = configFile.getBoolean("settings.GameMode.ForceSurvivalMode", false);
getmaxRegPerIp = configFile.getInt("settings.restrictions.maxRegPerIp", 1);
getPasswordHash = getPasswordHash();
getUnloggedinGroup = configFile.getString("settings.security.unLoggedinGroup", "unLoggedInGroup");
+1 -1
View File
@@ -128,7 +128,7 @@ settings:
# Enable double check of password when you register
# when it's true, registration require that kind of command:
# /register <password> <confirmPassword>
enablePasswordVerifier: true
enablePasswordConfirmation: true
# Should we protect the player inventory before logging in?
ProtectInventoryBeforeLogIn: true
# Should we display all other accounts from a player when he joins?