From 6a5f335e16669a7314237a9fedb55c59e1f2b584 Mon Sep 17 00:00:00 2001 From: sgdc3 Date: Sun, 4 Feb 2018 15:12:23 +0100 Subject: [PATCH 1/2] Implement #1483 --- .../fr/xephi/authme/settings/SettingsWarner.java | 11 +++++++++++ src/main/java/fr/xephi/authme/util/Utils.java | 14 ++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/src/main/java/fr/xephi/authme/settings/SettingsWarner.java b/src/main/java/fr/xephi/authme/settings/SettingsWarner.java index 176dca9c..ca049d56 100644 --- a/src/main/java/fr/xephi/authme/settings/SettingsWarner.java +++ b/src/main/java/fr/xephi/authme/settings/SettingsWarner.java @@ -5,9 +5,12 @@ import fr.xephi.authme.ConsoleLogger; import fr.xephi.authme.security.HashAlgorithm; import fr.xephi.authme.security.crypts.Argon2; import fr.xephi.authme.settings.properties.EmailSettings; +import fr.xephi.authme.settings.properties.HooksSettings; import fr.xephi.authme.settings.properties.PluginSettings; import fr.xephi.authme.settings.properties.RestrictionSettings; import fr.xephi.authme.settings.properties.SecuritySettings; +import fr.xephi.authme.util.Utils; +import org.bukkit.Bukkit; import javax.inject.Inject; @@ -50,6 +53,14 @@ public class SettingsWarner { ConsoleLogger.warning("Warning: Session timeout needs to be positive in order to work!"); } + // Warn if spigot.yml has settings.bungeecord set to true but config.yml has Hooks.bungeecord set to false + if (Utils.isSpigot() && Bukkit.spigot().getConfig().getBoolean("settings.bungeecord") + && !settings.getProperty(HooksSettings.BUNGEECORD)) { + ConsoleLogger.warning("Note: Hooks.bungeecord is set to false but your server appears to be running in" + + " bungeecord mode (see your spigot.yml). In order to allow the datasource caching and the AuthMeBungee" + + " add-on to work properly you have to enable this option!"); + } + // Check if argon2 library is present and can be loaded if (settings.getProperty(SecuritySettings.PASSWORD_HASH).equals(HashAlgorithm.ARGON2) && !Argon2.isLibraryLoaded()) { diff --git a/src/main/java/fr/xephi/authme/util/Utils.java b/src/main/java/fr/xephi/authme/util/Utils.java index 4db7f61b..8146f4e2 100644 --- a/src/main/java/fr/xephi/authme/util/Utils.java +++ b/src/main/java/fr/xephi/authme/util/Utils.java @@ -22,6 +22,20 @@ public final class Utils { private Utils() { } + /** + * Returns if the running server instance is craftbukkit or spigot based. + * + * @return true if the running server instance is spigot-based. + */ + public static boolean isSpigot() { + try { + Class.forName("org.spigotmc.SpigotConfig"); + } catch (ClassNotFoundException e) { + return false; + } + return true; + } + /** * Compile Pattern sneaky without throwing Exception. * From 818630034966d4a1c4d9ae1a723d400467a487bd Mon Sep 17 00:00:00 2001 From: Adeuran Date: Thu, 8 Feb 2018 03:12:06 +0900 Subject: [PATCH 2/2] Update messages_ko.yml (#1499) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update messages_ko.yml Additional Translate by Adeuran(아몬드노란맛 http://adeuran.tistory.com) * Some of Korean Translate to English 자동가입방지문자 -> CAPTCHA * Update messages_ko.yml --- src/main/resources/messages/messages_ko.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/resources/messages/messages_ko.yml b/src/main/resources/messages/messages_ko.yml index 2bf52b10..a7a96df7 100644 --- a/src/main/resources/messages/messages_ko.yml +++ b/src/main/resources/messages/messages_ko.yml @@ -1,4 +1,4 @@ -#Translated by Kirito (kds123321@naver.com), System32(me@syst32.com) +#Translated by Kirito (kds123321@naver.com), System32(me@syst32.com), Adeuran(adeuran@tistory.com) #14.05.2017 Thanks for use # 회원가입 @@ -98,8 +98,8 @@ email_cooldown_error: '&c이메일을 이미 발송했습니다. %time 후에 usage_captcha: '&3로그인 하려면 CAPTCHA 코드를 입력해야 합니다. 이 명령어를 사용하세요: /captcha ' wrong_captcha: '&c잘못된 CAPTCHA 코드 입니다. "/captcha THE_CAPTCHA" 형태로 입력해주세요!' valid_captcha: '&2CAPTCHA 코드가 확인되었습니다!' -# TODO captcha_for_registration: 'To register you have to solve a captcha first, please use the command: /captcha ' -# TODO register_captcha_valid: '&2Valid captcha! You may now register with /register' +captcha_for_registration: '회원가입을 하기 위해서는 먼저 CAPTCHA 코드를 입력해야합니다. 이 명령어를 이 명령어를 사용하세요: /captcha ' +register_captcha_valid: '&2올바른 CAPTCHA 코드입니다! 이제 /register 명령어를 이용하여 회원가입할 수 있습니다.' # 인증 코드 verification_code_required: '&3이 명령어는 매우 민감하게 작동되며, 이메일 인증을 필요로 합니다. 이메일을 확인하고 지시에 따르십시오.'