From dbd896b4627e20077bac804b8a13ede51e6b10df Mon Sep 17 00:00:00 2001 From: ljacqu Date: Sun, 14 Feb 2016 17:25:11 +0100 Subject: [PATCH 1/6] Improving logging in SQLite --- .../fr/xephi/authme/datasource/SQLite.java | 126 ++++++++---------- 1 file changed, 53 insertions(+), 73 deletions(-) diff --git a/src/main/java/fr/xephi/authme/datasource/SQLite.java b/src/main/java/fr/xephi/authme/datasource/SQLite.java index b971b9cbe..14258834f 100644 --- a/src/main/java/fr/xephi/authme/datasource/SQLite.java +++ b/src/main/java/fr/xephi/authme/datasource/SQLite.java @@ -164,16 +164,14 @@ public class SQLite implements DataSource { rs = pst.executeQuery(); if (rs.next()) { return buildAuthFromResultSet(rs); - } else { - return null; } } catch (SQLException ex) { - ConsoleLogger.showError(ex.getMessage()); - return null; + logSqlException(ex); } finally { close(rs); close(pst); } + return null; } @Override @@ -210,8 +208,7 @@ public class SQLite implements DataSource { pst.executeUpdate(); } } catch (SQLException ex) { - ConsoleLogger.showError(ex.getMessage()); - return false; + logSqlException(ex); } finally { close(pst); } @@ -241,13 +238,13 @@ public class SQLite implements DataSource { pst.setString(2, user); } pst.executeUpdate(); + return true; } catch (SQLException ex) { - ConsoleLogger.showError(ex.getMessage()); - return false; + logSqlException(ex); } finally { close(pst); } - return true; + return false; } @Override @@ -260,29 +257,25 @@ public class SQLite implements DataSource { pst.setString(3, auth.getRealName()); pst.setString(4, auth.getNickname()); pst.executeUpdate(); + return true; } catch (SQLException ex) { - ConsoleLogger.showError(ex.getMessage()); - return false; + logSqlException(ex); } finally { close(pst); } - return true; + return false; } @Override public int purgeDatabase(long until) { - PreparedStatement pst = null; - try { - - pst = con.prepareStatement("DELETE FROM " + tableName + " WHERE " + col.LAST_LOGIN + "(); + logSqlException(ex); } finally { close(rs); close(pst); } + return new ArrayList<>(); } @Override @@ -314,13 +307,13 @@ public class SQLite implements DataSource { pst = con.prepareStatement("DELETE FROM " + tableName + " WHERE " + col.NAME + "=?;"); pst.setString(1, user); pst.executeUpdate(); + return true; } catch (SQLException ex) { - ConsoleLogger.showError(ex.getMessage()); - return false; + logSqlException(ex); } finally { close(pst); } - return true; + return false; } @Override @@ -334,13 +327,13 @@ public class SQLite implements DataSource { pst.setString(4, auth.getWorld()); pst.setString(5, auth.getNickname()); pst.executeUpdate(); + return true; } catch (SQLException ex) { - ConsoleLogger.showError(ex.getMessage()); - return false; + logSqlException(ex); } finally { close(pst); } - return true; + return false; } @Override @@ -358,29 +351,26 @@ public class SQLite implements DataSource { } return countIp; } catch (SQLException ex) { - ConsoleLogger.showError(ex.getMessage()); - return 0; + logSqlException(ex); } finally { close(rs); close(pst); } + return 0; } @Override public boolean updateEmail(PlayerAuth auth) { - PreparedStatement pst = null; - try { - pst = con.prepareStatement("UPDATE " + tableName + " SET " + col.EMAIL + "=? WHERE " + col.NAME + "=?;"); + String sql = "UPDATE " + tableName + " SET " + col.EMAIL + "=? WHERE " + col.NAME + "=?;"; + try (PreparedStatement pst = con.prepareStatement(sql)) { pst.setString(1, auth.getEmail()); pst.setString(2, auth.getNickname()); pst.executeUpdate(); + return true; } catch (SQLException ex) { - ConsoleLogger.showError(ex.getMessage()); - return false; - } finally { - close(pst); + logSqlException(ex); } - return true; + return false; } @Override @@ -388,7 +378,7 @@ public class SQLite implements DataSource { try { con.close(); } catch (SQLException ex) { - ConsoleLogger.showError(ex.getMessage()); + logSqlException(ex); } } @@ -401,7 +391,7 @@ public class SQLite implements DataSource { try { st.close(); } catch (SQLException ex) { - ConsoleLogger.showError(ex.getMessage()); + logSqlException(ex); } } } @@ -411,7 +401,7 @@ public class SQLite implements DataSource { try { rs.close(); } catch (SQLException ex) { - ConsoleLogger.showError(ex.getMessage()); + logSqlException(ex); } } } @@ -420,24 +410,24 @@ public class SQLite implements DataSource { public List getAllAuthsByName(PlayerAuth auth) { PreparedStatement pst = null; ResultSet rs = null; - List countIp = new ArrayList<>(); + List names = new ArrayList<>(); try { + // TODO ljacqu 20160214: Use SELECT name if only the name is required pst = con.prepareStatement("SELECT * FROM " + tableName + " WHERE " + col.IP + "=?;"); pst.setString(1, auth.getIp()); rs = pst.executeQuery(); while (rs.next()) { - countIp.add(rs.getString(col.NAME)); + names.add(rs.getString(col.NAME)); } - return countIp; + return names; } catch (SQLException ex) { logSqlException(ex); - return new ArrayList<>(); - } catch (NullPointerException npe) { - return new ArrayList<>(); + } finally { close(rs); close(pst); } + return new ArrayList<>(); } @Override @@ -454,14 +444,12 @@ public class SQLite implements DataSource { } return countIp; } catch (SQLException ex) { - ConsoleLogger.showError(ex.getMessage()); - return new ArrayList<>(); - } catch (NullPointerException npe) { - return new ArrayList<>(); + logSqlException(ex); } finally { close(rs); close(pst); } + return new ArrayList<>(); } @Override @@ -478,14 +466,12 @@ public class SQLite implements DataSource { } return countEmail; } catch (SQLException ex) { - ConsoleLogger.showError(ex.getMessage()); - return new ArrayList<>(); - } catch (NullPointerException npe) { - return new ArrayList<>(); - } finally { + logSqlException(ex); + } finally { close(rs); close(pst); } + return new ArrayList<>(); } @Override @@ -520,8 +506,7 @@ public class SQLite implements DataSource { if (rs.next()) return (rs.getInt(col.IS_LOGGED) == 1); } catch (SQLException ex) { - ConsoleLogger.showError(ex.getMessage()); - return false; + logSqlException(ex); } finally { close(rs); close(pst); @@ -538,7 +523,7 @@ public class SQLite implements DataSource { pst.setString(2, user); pst.executeUpdate(); } catch (SQLException ex) { - ConsoleLogger.showError(ex.getMessage()); + logSqlException(ex); } finally { close(pst); } @@ -554,7 +539,7 @@ public class SQLite implements DataSource { pst.setString(2, user); pst.executeUpdate(); } catch (SQLException ex) { - ConsoleLogger.showError(ex.getMessage()); + logSqlException(ex); } finally { close(pst); } @@ -569,7 +554,7 @@ public class SQLite implements DataSource { pst.setInt(2, 1); pst.executeUpdate(); } catch (SQLException ex) { - ConsoleLogger.showError(ex.getMessage()); + logSqlException(ex); } finally { close(pst); } @@ -577,22 +562,20 @@ public class SQLite implements DataSource { @Override public int getAccountsRegistered() { - int result = 0; PreparedStatement pst = null; ResultSet rs; try { pst = con.prepareStatement("SELECT COUNT(*) FROM " + tableName + ";"); rs = pst.executeQuery(); if (rs != null && rs.next()) { - result = rs.getInt(1); + return rs.getInt(1); } } catch (SQLException ex) { - ConsoleLogger.showError(ex.getMessage()); - return result; + logSqlException(ex); } finally { close(pst); } - return result; + return 0; } @Override @@ -604,7 +587,7 @@ public class SQLite implements DataSource { pst.setString(2, oldOne); pst.executeUpdate(); } catch (SQLException ex) { - ConsoleLogger.showError(ex.getMessage()); + logSqlException(ex); } finally { close(pst); } @@ -623,8 +606,7 @@ public class SQLite implements DataSource { auths.add(auth); } } catch (SQLException ex) { - ConsoleLogger.showError(ex.getMessage()); - return auths; + logSqlException(ex); } finally { close(pst); } @@ -644,8 +626,7 @@ public class SQLite implements DataSource { auths.add(auth); } } catch (SQLException ex) { - ConsoleLogger.showError(ex.getMessage()); - return auths; + logSqlException(ex); } finally { close(pst); } @@ -669,8 +650,7 @@ public class SQLite implements DataSource { } private static void logSqlException(SQLException e) { - ConsoleLogger.showError("Error while executing SQL statement: " + StringUtils.formatException(e)); - ConsoleLogger.writeStackTrace(e); + ConsoleLogger.logException("Error while executing SQL statement:", e); } private PlayerAuth buildAuthFromResultSet(ResultSet row) throws SQLException { From 2c9cb6d99a446a963c223d99116d0ad587de9631 Mon Sep 17 00:00:00 2001 From: ljacqu Date: Sun, 14 Feb 2016 17:48:47 +0100 Subject: [PATCH 2/6] #521 #514 Update zhhk file and add TODO comments for missing messages TODO comments added automatically by ToolTask verifyMessages --- src/main/resources/messages/messages_bg.yml | 7 +++++ src/main/resources/messages/messages_br.yml | 2 ++ src/main/resources/messages/messages_cz.yml | 6 +++++ src/main/resources/messages/messages_de.yml | 2 ++ src/main/resources/messages/messages_es.yml | 7 ++++- src/main/resources/messages/messages_eu.yml | 12 +++++++++ src/main/resources/messages/messages_fi.yml | 9 +++++++ src/main/resources/messages/messages_fr.yml | 2 ++ src/main/resources/messages/messages_gl.yml | 6 +++++ src/main/resources/messages/messages_hu.yml | 4 ++- src/main/resources/messages/messages_id.yml | 6 +++++ src/main/resources/messages/messages_it.yml | 1 + src/main/resources/messages/messages_ko.yml | 6 ++++- src/main/resources/messages/messages_lt.yml | 19 ++++++++++++++ src/main/resources/messages/messages_nl.yml | 8 ++++-- src/main/resources/messages/messages_pl.yml | 9 +++++++ src/main/resources/messages/messages_pt.yml | 6 +++++ src/main/resources/messages/messages_ru.yml | 4 +++ src/main/resources/messages/messages_sk.yml | 26 +++++++++++++++++-- src/main/resources/messages/messages_tr.yml | 6 +++++ src/main/resources/messages/messages_uk.yml | 5 ++++ src/main/resources/messages/messages_vn.yml | 7 +++++ src/main/resources/messages/messages_zhcn.yml | 5 ++++ src/main/resources/messages/messages_zhhk.yml | 4 +++ src/main/resources/messages/messages_zhtw.yml | 5 ++++ 25 files changed, 167 insertions(+), 7 deletions(-) diff --git a/src/main/resources/messages/messages_bg.yml b/src/main/resources/messages/messages_bg.yml index ce4773558..d77c22c0c 100644 --- a/src/main/resources/messages/messages_bg.yml +++ b/src/main/resources/messages/messages_bg.yml @@ -53,3 +53,10 @@ email_send: '[AuthMe] Изпраен е имейл !' country_banned: Твоята държава е забранена в този сървър! antibot_auto_enabled: '[AuthMe] AntiBotMod автоматично включен, открита е потенциална атака!' antibot_auto_disabled: '[AuthMe] AntiBotMod автоматично изключване след %m Минути.' +# TODO email_already_used: '&4The email address is already being used' +# TODO password_error_nick: '&cYou can''t use your name as password, please choose another one...' +# TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...' +# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' +# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:' +# TODO invalid_session: '&cYour IP has been changed and your session data has expired!' +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file diff --git a/src/main/resources/messages/messages_br.yml b/src/main/resources/messages/messages_br.yml index 922a5b96c..f93890976 100644 --- a/src/main/resources/messages/messages_br.yml +++ b/src/main/resources/messages/messages_br.yml @@ -59,4 +59,6 @@ email_exists: '&cUm email de recuperação já foi enviado! Você pode reenviar country_banned: '&4Seu país foi banido do servidor! Your country is banned from this server!' antibot_auto_enabled: '&4[AntiBotService] AntiBot ativado devido ao grande número de conexões!' antibot_auto_disabled: '&2[AntiBotService] AntiBot desativado após %m minutos!' +# TODO two_factor_create: Missing tag %url two_factor_create: '&2Seu código secreto é %code' +# TODO email_already_used: '&4The email address is already being used' \ No newline at end of file diff --git a/src/main/resources/messages/messages_cz.yml b/src/main/resources/messages/messages_cz.yml index 3098d4637..4367b45ff 100644 --- a/src/main/resources/messages/messages_cz.yml +++ b/src/main/resources/messages/messages_cz.yml @@ -53,3 +53,9 @@ email_send: '[AuthMe] Email pro obnoveni hesla odeslan!' country_banned: 'Vase zeme je na tomto serveru zakazana' antibot_auto_enabled: '[AuthMe] AntiBotMod automaticky spusten z duvodu masivnich pripojeni!' antibot_auto_disabled: '[AuthMe] AntiBotMod automaticky ukoncen po %m minutach, doufejme v konec invaze' +# TODO email_already_used: '&4The email address is already being used' +# TODO password_error_nick: '&cYou can''t use your name as password, please choose another one...' +# TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...' +# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' +# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:' +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file diff --git a/src/main/resources/messages/messages_de.yml b/src/main/resources/messages/messages_de.yml index 9a9c01816..cda527d1d 100644 --- a/src/main/resources/messages/messages_de.yml +++ b/src/main/resources/messages/messages_de.yml @@ -57,4 +57,6 @@ country_banned: '&4Dein Land ist gesperrt' antibot_auto_enabled: '&4[AntiBotService] AntiBotMod wurde aufgrund hoher Netzauslastung automatisch aktiviert!' antibot_auto_disabled: '&2[AntiBotService] AntiBotMod wurde nach %m Minuten deaktiviert, hoffentlich ist die Invasion vorbei' kick_antibot: 'AntiBotMod ist aktiviert! Bitte warte einige Minuten, bevor du dich mit dem Server verbindest' +# TODO two_factor_create: Missing tag %url two_factor_create: '&2Dein geheimer Code ist %code' +# TODO email_already_used: '&4The email address is already being used' \ No newline at end of file diff --git a/src/main/resources/messages/messages_es.yml b/src/main/resources/messages/messages_es.yml index 70b9f830e..138beb392 100644 --- a/src/main/resources/messages/messages_es.yml +++ b/src/main/resources/messages/messages_es.yml @@ -54,4 +54,9 @@ email_send: '[AuthMe] Correo de recuperación enviado !' country_banned: 'Tu país ha sido baneado de este servidor!' antibot_auto_enabled: '[AuthMe] AntiBotMod activado automáticamente debido a conexiones masivas!' antibot_auto_disabled: '[AuthMe] AntiBotMod desactivado automáticamente luego de %m minutos. Esperamos que haya terminado' - +# TODO email_already_used: '&4The email address is already being used' +# TODO password_error_nick: '&cYou can''t use your name as password, please choose another one...' +# TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...' +# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' +# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:' +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file diff --git a/src/main/resources/messages/messages_eu.yml b/src/main/resources/messages/messages_eu.yml index 5775730bb..1cbd90d45 100644 --- a/src/main/resources/messages/messages_eu.yml +++ b/src/main/resources/messages/messages_eu.yml @@ -47,3 +47,15 @@ email_confirm: '[AuthMe] Konfirmatu zure emaila !' email_changed: '[AuthMe] Emaila aldatua!' email_send: '[AuthMe] Berreskuratze emaila bidalita !' country_banned: '[AuthMe] Zure herrialdea blokeatuta dago zerbitzari honetan' +# TODO email_already_used: '&4The email address is already being used' +# TODO password_error_nick: '&cYou can''t use your name as password, please choose another one...' +# TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...' +# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' +# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:' +# TODO antibot_auto_enabled: '&4[AntiBotService] AntiBot enabled due to the huge number of connections!' +# TODO invalid_session: '&cYour IP has been changed and your session data has expired!' +# TODO wrong_captcha: '&cWrong captcha, please type "/captcha THE_CAPTCHA" into the chat!' +# TODO usage_captcha: '&3To login you have to solve a captcha code, please use the command "/captcha "' +# TODO antibot_auto_disabled: '&2[AntiBotService] AntiBot disabled disabled after %m minutes!' +# TODO valid_captcha: '&2Captcha code solved correctly!' +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file diff --git a/src/main/resources/messages/messages_fi.yml b/src/main/resources/messages/messages_fi.yml index 2702cd531..df667849f 100644 --- a/src/main/resources/messages/messages_fi.yml +++ b/src/main/resources/messages/messages_fi.yml @@ -50,3 +50,12 @@ email_added: '[AuthMe] Sähköposti lisätty!' email_confirm: '[AuthMe] Vahvistuta sähköposti!' email_changed: '[AuthMe] Sähköposti vaihdettu!' email_send: '[AuthMe] Palautus sähköposti lähetetty!' +# TODO email_already_used: '&4The email address is already being used' +# TODO password_error_nick: '&cYou can''t use your name as password, please choose another one...' +# TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...' +# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' +# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:' +# TODO country_banned: '&4Your country is banned from this server!' +# TODO antibot_auto_enabled: '&4[AntiBotService] AntiBot enabled due to the huge number of connections!' +# TODO antibot_auto_disabled: '&2[AntiBotService] AntiBot disabled disabled after %m minutes!' +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file diff --git a/src/main/resources/messages/messages_fr.yml b/src/main/resources/messages/messages_fr.yml index 54ca4f5e5..17535768f 100644 --- a/src/main/resources/messages/messages_fr.yml +++ b/src/main/resources/messages/messages_fr.yml @@ -58,4 +58,6 @@ antibot_auto_enabled: '[AuthMe] AntiBotMod a été activé automatiquement à ca antibot_auto_disabled: '[AuthMe] AntiBotMod a été désactivé automatiquement après %m minutes, espérons que l''invasion soit arrêtée!' kick_antibot: 'AntiBotMod est activé ! Veuillez attendre quelques minutes avant de joindre le serveur.' email_exists: '&cUn email de restauration a déjà été envoyé ! Vous pouvez le jeter et vous en faire envoyez un nouveau en utilisant :' +# TODO two_factor_create: Missing tag %url two_factor_create: '&2Votre code secret est %code' +# TODO email_already_used: '&4The email address is already being used' \ No newline at end of file diff --git a/src/main/resources/messages/messages_gl.yml b/src/main/resources/messages/messages_gl.yml index 019e238bd..26fd5a95b 100644 --- a/src/main/resources/messages/messages_gl.yml +++ b/src/main/resources/messages/messages_gl.yml @@ -55,3 +55,9 @@ country_banned: 'O teu país está bloqueado neste servidor' antibot_auto_enabled: '[AuthMe] AntiBotMod conectouse automáticamente debido a conexións masivas!' antibot_auto_disabled: '[AuthMe] AntiBotMod desactivouse automáticamente despois de %m minutos, esperemos que a invasión se detivera' +# TODO email_already_used: '&4The email address is already being used' +# TODO password_error_nick: '&cYou can''t use your name as password, please choose another one...' +# TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...' +# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' +# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:' +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file diff --git a/src/main/resources/messages/messages_hu.yml b/src/main/resources/messages/messages_hu.yml index 099179f80..1766e9e4c 100644 --- a/src/main/resources/messages/messages_hu.yml +++ b/src/main/resources/messages/messages_hu.yml @@ -37,7 +37,7 @@ name_len: '&4A felhasználó neved túl hosszú, vagy túl rövid! Válassz más regex: '&4A felhasználóneved nem használható karaktereket tartalmaz. Elfogadott karakterek: REG_EX' add_email: '&3Kérlek add hozzá a felhasználódhoz az email címedet "/email add "' recovery_email: '&3Ha elfelejtetted a jelszavad, használd az: "/email recovery "' -usage_captcha: '&3A bejelentkezéshez CAPTCHA szükséges, kérem használd a következő parancsot "/captcha "' +usage_captcha: '&3A bejelentkezéshez CAPTCHA szükséges, kérem használd a következő parancsot "/captcha "' wrong_captcha: '&cHibás captcha, kérlek írd be a következő parancsot "/captcha THE_CAPTCHA" a chat-be!' valid_captcha: '&2Captcha sikeresen feloldva!' kick_forvip: '&3VIP játékos csatlakozott a szerverhez!' @@ -57,3 +57,5 @@ country_banned: '&4Az országod tiltólistán van ezen a szerveren!' antibot_auto_enabled: '&4[AntiBot] Az AntiBot védelem bekapcsolt a nagy számú hálózati kapcsolat miatt!' antibot_auto_disabled: '&2[AntiBot] Az AntiBot kikapcsol %m múlva!' kick_antibot: 'Az AntiBot védelem bekapcsolva! Kérünk várj pár másodpercet a csatlakozáshoz.' +# TODO email_already_used: '&4The email address is already being used' +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' diff --git a/src/main/resources/messages/messages_id.yml b/src/main/resources/messages/messages_id.yml index fd2b12673..e26f3230a 100644 --- a/src/main/resources/messages/messages_id.yml +++ b/src/main/resources/messages/messages_id.yml @@ -53,3 +53,9 @@ email_send: '&2Email pemulihan akun telah dikirim! Silahkan periksa kotak masuk email_exists: '&cEmail pemulihan sudah dikirim! kamu bisa membatalkan dan mengirimkan yg baru dengan command dibawah:' antibot_auto_enabled: '&4[AntiBotService] AntiBot diaktifkan dikarenakan banyak koneksi yg diterima!' antibot_auto_disabled: '&2[AntiBotService] AntiBot dimatikan setelah %m menit!' +# TODO email_already_used: '&4The email address is already being used' +# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' +# TODO country_banned: '&4Your country is banned from this server!' +# TODO usage_unreg: '&cUsage: /unregister ' +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' +# TODO usage_reg: '&cUsage: /register ' \ No newline at end of file diff --git a/src/main/resources/messages/messages_it.yml b/src/main/resources/messages/messages_it.yml index ccf7c5b16..e470671c2 100644 --- a/src/main/resources/messages/messages_it.yml +++ b/src/main/resources/messages/messages_it.yml @@ -59,3 +59,4 @@ antibot_auto_enabled: 'Il servizio di AntiBot è stato automaticamente abilitato antibot_auto_disabled: "Il servizio di AntiBot è stato automaticamente disabilitato dopo %m Minuti, sperando che l'attacco sia finito!" kick_antibot: 'Il servizio di AntiBot è attualmente attivo! Devi aspettare qualche minuto prima di poter entrare nel server.' two_factor_create: '&2Il tuo codice segreto è: &f%code&n&2Puoi anche scannerizzare il codice QR da qui: &f%url' +# TODO email_already_used: '&4The email address is already being used' \ No newline at end of file diff --git a/src/main/resources/messages/messages_ko.yml b/src/main/resources/messages/messages_ko.yml index 8fca8139e..81296342f 100644 --- a/src/main/resources/messages/messages_ko.yml +++ b/src/main/resources/messages/messages_ko.yml @@ -1,7 +1,6 @@ # Korean translate by wolfwork # # wolfdate25@gmail.com # # 16.08.2014 Thanks for use # - unknown_user: '&f사용자가 데이터베이스에 존재하지 않습니다' unsafe_spawn: '&f당신이 종료한 위치는 안전하지 않았습니다, 세계의 소환지점으로 이동합니다' not_logged_in: '&c접속되어있지 않습니다!' @@ -58,3 +57,8 @@ email_exists: '[AuthMe] 당신의 계정에 이미 이메일이 존재합니다. country_banned: '당신의 국가는 이 서버에서 차단당했습니다' antibot_auto_enabled: '[AuthMe] 봇차단모드가 연결 개수 때문에 자동적으로 활성화됩니다!' antibot_auto_disabled: '[AuthMe] 봇차단모드가 %m 분 후에 자동적으로 비활성화됩니다' +# TODO email_already_used: '&4The email address is already being used' +# TODO password_error_nick: '&cYou can''t use your name as password, please choose another one...' +# TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...' +# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file diff --git a/src/main/resources/messages/messages_lt.yml b/src/main/resources/messages/messages_lt.yml index ea5c716ab..530303b53 100644 --- a/src/main/resources/messages/messages_lt.yml +++ b/src/main/resources/messages/messages_lt.yml @@ -40,3 +40,22 @@ wrong_captcha: '&cNeteisinga Captcha, naudokite : /captcha THE_CAPTCHA' valid_captcha: '&cJusu captcha Teisinga!' kick_forvip: '&cA VIP prisijunge i pilna serveri!' kick_fullserver: '&cServeris yra pilnas, Atsiprasome.' +# TODO email_already_used: '&4The email address is already being used' +# TODO password_error_nick: '&cYou can''t use your name as password, please choose another one...' +# TODO usage_email_change: '&cUsage: /email change ' +# TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...' +# TODO new_email_invalid: '&cInvalid new email, try again!' +# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' +# TODO email_send: '&2Recovery email sent successfully! Please check your email inbox!' +# TODO usage_email_recovery: '&cUsage: /email recovery ' +# TODO email_confirm: '&cPlease confirm your email address!' +# TODO old_email_invalid: '&cInvalid old email, try again!' +# TODO email_changed: '&2Email address changed correctly!' +# TODO antibot_auto_disabled: '&2[AntiBotService] AntiBot disabled disabled after %m minutes!' +# TODO email_added: '&2Email address successfully added to your account!' +# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:' +# TODO country_banned: '&4Your country is banned from this server!' +# TODO antibot_auto_enabled: '&4[AntiBotService] AntiBot enabled due to the huge number of connections!' +# TODO usage_email_add: '&cUsage: /email add ' +# TODO email_invalid: '&cInvalid email address, try again!' +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file diff --git a/src/main/resources/messages/messages_nl.yml b/src/main/resources/messages/messages_nl.yml index b3d99273c..60ab89c5e 100644 --- a/src/main/resources/messages/messages_nl.yml +++ b/src/main/resources/messages/messages_nl.yml @@ -15,7 +15,7 @@ user_regged: '&cGebruikersnaam is al geregistreerd' usage_reg: '&cGebruik: /register ' max_reg: Je hebt de maximale registraties van jouw account overschreden. no_perm: '&cGeen toegang!' -error: Error: neem contact op met een administrator! +error: 'Error: neem contact op met een administrator!' login_msg: '&cLog in met "/login "' reg_msg: '&cRegistreer met "/register "' usage_unreg: '&cGebruik: /unregister password' @@ -30,7 +30,7 @@ same_nick: Er is al iemand met jou gebruikersnaam online. registered: '&cSuccesvol geregistreerd!' pass_len: Je gekozen wachtwoord voldoet niet aan de minimum of maximum lengte reload: Configuratie en database is opnieuw opgestard -timeout: Login time-out: het duurde telang voor je je inlogde. +timeout: 'Login time-out: het duurde telang voor je je inlogde.' usage_changepassword: 'Gebruik: /changepassword ' name_len: '&cJe gebruikersnaam is te kort' regex: '&cJouw gebruikersnaam bevat illegale tekens. Toegestaane karakters: REG_EX' @@ -55,4 +55,8 @@ country_banned: 'Jouw land is geband op deze server' antibot_auto_enabled: '[AuthMe] AntiBotMod automatisch aangezet vanewge veel verbindingen!' antibot_auto_disabled: '[AuthMe] AntiBotMod automatisch uitgezet na %m minuten, hopelijk is de invasie gestopt' kick_antibot: 'AntiBot is aangezet! Wacht alsjeblieft enkele minuten voor je met de server verbindt.' +# TODO two_factor_create: Missing tag %url two_factor_create: '&2Je geheime code is %code' +# TODO email_already_used: '&4The email address is already being used' +# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:' +# TODO reg_email_msg: '&3Please, register to the server with the command "/register "' \ No newline at end of file diff --git a/src/main/resources/messages/messages_pl.yml b/src/main/resources/messages/messages_pl.yml index b0b937cc6..4efa88408 100644 --- a/src/main/resources/messages/messages_pl.yml +++ b/src/main/resources/messages/messages_pl.yml @@ -50,3 +50,12 @@ email_added: '[AuthMe] Email dodany!' email_confirm: '[AuthMe] Potwierdz swoj email!' email_changed: '[AuthMe] Email zmieniony!' email_send: '[AuthMe] Email z odzyskaniem wyslany!' +# TODO email_already_used: '&4The email address is already being used' +# TODO password_error_nick: '&cYou can''t use your name as password, please choose another one...' +# TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...' +# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' +# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:' +# TODO country_banned: '&4Your country is banned from this server!' +# TODO antibot_auto_enabled: '&4[AntiBotService] AntiBot enabled due to the huge number of connections!' +# TODO antibot_auto_disabled: '&2[AntiBotService] AntiBot disabled disabled after %m minutes!' +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file diff --git a/src/main/resources/messages/messages_pt.yml b/src/main/resources/messages/messages_pt.yml index f59eba14f..db276e97c 100644 --- a/src/main/resources/messages/messages_pt.yml +++ b/src/main/resources/messages/messages_pt.yml @@ -54,3 +54,9 @@ email_send: 'Nova palavra-passe enviada para o seu email!' country_banned: 'O seu país está banido deste servidor' antibot_auto_enabled: '[AuthMe] AntiBotMod activado automaticamente devido a um aumento anormal de tentativas de ligação!' antibot_auto_disabled: '[AuthMe] AntiBotMod desactivado automaticamente após %m minutos, esperamos que a invasão tenha parado' +# TODO email_already_used: '&4The email address is already being used' +# TODO password_error_nick: '&cYou can''t use your name as password, please choose another one...' +# TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...' +# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' +# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:' +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file diff --git a/src/main/resources/messages/messages_ru.yml b/src/main/resources/messages/messages_ru.yml index 7b1f2a509..454361916 100644 --- a/src/main/resources/messages/messages_ru.yml +++ b/src/main/resources/messages/messages_ru.yml @@ -55,3 +55,7 @@ email_send: '[AuthMe] Письмо с инструкциями для восст country_banned: 'Вход с IP-адресов вашей страны воспрещен на этом сервере' antibot_auto_enabled: '&a[AuthMe] AntiBot-режим автоматически включен из-за большого количества входов!' antibot_auto_disabled: '&a[AuthMe] AntiBot-режим автоматичски отключен после %m мин. Надеюсь атака закончилась' +# TODO email_already_used: '&4The email address is already being used' +# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' +# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:' +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file diff --git a/src/main/resources/messages/messages_sk.yml b/src/main/resources/messages/messages_sk.yml index 398df3ebd..924f452d9 100644 --- a/src/main/resources/messages/messages_sk.yml +++ b/src/main/resources/messages/messages_sk.yml @@ -1,7 +1,6 @@ # Slovak translate by Judzi # # www.judzi.eu | judzi@cs-gaming.eu # # 02.02.2013 - 4:35 AM - Thanks for use # - logged_in: '&cAktuálne si uz prihláseny!' not_logged_in: '&cNie si este prihláseny!' reg_disabled: '&cRegistrácia nie je povolená' @@ -39,4 +38,27 @@ name_len: '&cTvoje meno je velmi krátke alebo dlhé' regex: '&cTvoje meno obsahuje zakázané znaky. Povolené znaky: REG_EX' add_email: '&cPridaj svoj e-mail príkazom "/email add email zopakujEmail"' recovery_email: '&cZabudol si heslo? Pouzi príkaz /email recovery ' - +# TODO email_already_used: '&4The email address is already being used' +# TODO password_error_nick: '&cYou can''t use your name as password, please choose another one...' +# TODO usage_email_change: '&cUsage: /email change ' +# TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...' +# TODO new_email_invalid: '&cInvalid new email, try again!' +# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' +# TODO email_send: '&2Recovery email sent successfully! Please check your email inbox!' +# TODO email_confirm: '&cPlease confirm your email address!' +# TODO usage_captcha: '&3To login you have to solve a captcha code, please use the command "/captcha "' +# TODO usage_email_recovery: '&cUsage: /email recovery ' +# TODO email_changed: '&2Email address changed correctly!' +# TODO old_email_invalid: '&cInvalid old email, try again!' +# TODO antibot_auto_disabled: '&2[AntiBotService] AntiBot disabled disabled after %m minutes!' +# TODO kick_fullserver: '&4The server is full, try again later!' +# TODO email_added: '&2Email address successfully added to your account!' +# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:' +# TODO country_banned: '&4Your country is banned from this server!' +# TODO antibot_auto_enabled: '&4[AntiBotService] AntiBot enabled due to the huge number of connections!' +# TODO email_invalid: '&cInvalid email address, try again!' +# TODO kick_forvip: '&3A VIP player has joined the server when it was full!' +# TODO usage_email_add: '&cUsage: /email add ' +# TODO wrong_captcha: '&cWrong captcha, please type "/captcha THE_CAPTCHA" into the chat!' +# TODO valid_captcha: '&2Captcha code solved correctly!' +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file diff --git a/src/main/resources/messages/messages_tr.yml b/src/main/resources/messages/messages_tr.yml index f84ceac4e..40983a4c9 100644 --- a/src/main/resources/messages/messages_tr.yml +++ b/src/main/resources/messages/messages_tr.yml @@ -53,3 +53,9 @@ email_send: '[AuthMe] Kurtarma postasi gonderildi !' country_banned: 'Ulken bu serverdan banlandi !' antibot_auto_enabled: '[AuthMe] AntiBotMode otomatik olarak etkinlestirildi!' antibot_auto_disabled: '[AuthMe] AntiBotMode %m dakika sonra otomatik olarak isgal yuzundan devredisi birakildi' +# TODO email_already_used: '&4The email address is already being used' +# TODO password_error_nick: '&cYou can''t use your name as password, please choose another one...' +# TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...' +# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' +# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:' +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file diff --git a/src/main/resources/messages/messages_uk.yml b/src/main/resources/messages/messages_uk.yml index 6b132d8da..7b9baa662 100644 --- a/src/main/resources/messages/messages_uk.yml +++ b/src/main/resources/messages/messages_uk.yml @@ -54,4 +54,9 @@ email_changed: '[AuthMe] &2Email змінено!' email_send: '[AuthMe] Лист для відновлення надіслано на ваш Email!' country_banned: 'Сервер не доступний для вашої країни | Your country is banned from this server' antibot_auto_enabled: '[AuthMe] AntiBotMod автоматично увімкнений (забагато одначасних з`єднань)!' +# TODO antibot_auto_disabled: Missing tag %m antibot_auto_disabled: '[AuthMe] AntiBotMod автоматично вимкнувся, сподіваємось атака зупинена' +# TODO email_already_used: '&4The email address is already being used' +# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' +# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:' +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file diff --git a/src/main/resources/messages/messages_vn.yml b/src/main/resources/messages/messages_vn.yml index ad175e18d..164436123 100644 --- a/src/main/resources/messages/messages_vn.yml +++ b/src/main/resources/messages/messages_vn.yml @@ -36,6 +36,7 @@ regex: '&cTên đăng nhập của bạn có chứa kí tự đặc biệt khôn add_email: '&cVui lòng thêm địa chỉ email cho tài khoản với lệnh: /email add email-của-bạn nhập-lại-email-của-bạn' recovery_email: '&cQuên mật khẩu? Hãy dùng lệnh /email recovery ' usage_captcha: '&cBạn cần nhập mã xác nhận: /captcha ' +# TODO wrong_captcha: Missing tag THE_CAPTCHA wrong_captcha: '&cSai mã xác nhận, nhập lại: /captcha ' valid_captcha: '&aMã xác nhận hợp lệ!' kick_forvip: '&cNgười chơi VIP đã vào server hiện đang full!' @@ -53,3 +54,9 @@ email_send: '[AuthMe] Đã gửi email khôi phục mật khẩu tới bạn !' country_banned: 'Rất tiếc, quốc gia của bạn không được phép gia nhập server' antibot_auto_enabled: '[AuthMe] AntiBot đã được kích hoạt vì lượng người chơi kết nối vượt quá giới hạn!' antibot_auto_disabled: '[AuthMe] AntiBot tự huỷ kích hoạt sau %m phút, hi vọng lượng kết nối sẽ giảm bớt' +# TODO email_already_used: '&4The email address is already being used' +# TODO password_error_nick: '&cYou can''t use your name as password, please choose another one...' +# TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...' +# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' +# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:' +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file diff --git a/src/main/resources/messages/messages_zhcn.yml b/src/main/resources/messages/messages_zhcn.yml index 897c052da..426617934 100644 --- a/src/main/resources/messages/messages_zhcn.yml +++ b/src/main/resources/messages/messages_zhcn.yml @@ -42,6 +42,7 @@ add_email: '&8[&6用戶系統&8] &b請為你的帳戶立即添加電郵地址: bad_database_email: '&8[&6用戶系統&8] 此指令只適用於使用MySQL或SQLite之伺服器。' recovery_email: '&8[&6用戶系統&8] &c忘記密碼 ? 請使用這個的指令來更新密碼: 《 /email recovery <電郵地址> 》' usage_captcha: '&8[&6用戶系統&8] &c用法: 《 /captcha 》' +# TODO wrong_captcha: Missing tag THE_CAPTCHA wrong_captcha: '&8[&6用戶系統&8] &c你輸入了錯誤的驗證碼,請使用 《 /captcha <驗證碼> 》 再次輸入。' valid_captcha: '&8[&6用戶系統&8] &c你所輸入的驗證碼是無效的 !' kick_forvip: '&c因為有VIP玩家登入了伺服器。' @@ -59,3 +60,7 @@ email_send: '&8[&6用戶系統&8] 忘記密碼信件已寄出,請查收。' country_banned: '&8[&6用戶系統&8] 本伺服器已停止對你的國家提供遊戲服務。' antibot_auto_enabled: '&8[&6用戶系統&8] 防止機械人程序已因應現時大量不尋常的連線而啟用。' antibot_auto_disabled: '&8[&6用戶系統&8] 防止機械人程序檢查到不正常連接數已減少,並於 %m 分鐘後停止運作。' +# TODO email_already_used: '&4The email address is already being used' +# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' +# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:' +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file diff --git a/src/main/resources/messages/messages_zhhk.yml b/src/main/resources/messages/messages_zhhk.yml index 3de59ddcb..4928a0f7e 100644 --- a/src/main/resources/messages/messages_zhhk.yml +++ b/src/main/resources/messages/messages_zhhk.yml @@ -59,3 +59,7 @@ email_send: '已寄出忘記密碼信件。' country_banned: '你的國家已被本伺服器封禁。' antibot_auto_enabled: '防止機械人程序因大量不尋常連線而啟用。' antibot_auto_disabled: '防止機械人程序將於 %m 分鐘後停止運作。' +email_already_used: '&4邮箱已被使用' +kick_antibot: '[AuthMe] 防机器人程序已启用 !请稍等几分钟後才再次进入服务器' +email_exists: '&c恢复邮件已发送 ! 你可以丢弃它然後使用以下的指令来发送新的邮件:' +two_factor_create: '&2你的代码是 %code,你可以使用 %url 来扫描' diff --git a/src/main/resources/messages/messages_zhtw.yml b/src/main/resources/messages/messages_zhtw.yml index 97e4a0b42..f9dd0d42d 100644 --- a/src/main/resources/messages/messages_zhtw.yml +++ b/src/main/resources/messages/messages_zhtw.yml @@ -37,10 +37,12 @@ reload: '&b【AuthMe】&6已重新讀取設定檔及資料庫' timeout: '&b【AuthMe】&6超過登入時間,請稍後再試一次' usage_changepassword: '&b【AuthMe】&6用法: &c"/changepassword <舊密碼> <新密碼>"' name_len: '&b【AuthMe】&6你的暱稱 太長 / 太短 了!' +# TODO regex: Missing tag REG_EX regex: '&b【AuthMe】&6暱稱裡包含不能使用的字符' add_email: '&b【AuthMe】&6請使用 &c"/email add <你的Email> <再次輸入你的Email>" &6來添加 Email' recovery_email: '&b【AuthMe】&6忘記密碼了嗎? 使用 &c"/email recovery <你的Email>"' usage_captcha: '&b【AuthMe】&6請用 &c"/captcha " &6來輸入你的驗證碼' +# TODO wrong_captcha: Missing tag THE_CAPTCHA wrong_captcha: '&b【AuthMe】&6錯誤的驗證碼' valid_captcha: '&b【AuthMe】&6驗證碼無效!' kick_forvip: '&b【AuthMe】&6你已經被請出。&c原因 : 有 VIP 玩家登入伺服器' @@ -59,3 +61,6 @@ email_exists: '&b【AuthMe】&6這個帳戶已經有設定電子郵件了' country_banned: '&b【AuthMe】&6你所在的地區無法進入此伺服器' antibot_auto_enabled: '&b【AuthMe】&6AntiBotMod已自動啟用!' antibot_auto_disabled: '&b【AuthMe】&6AntiBotMod將會於 &c%m &6分鐘後自動關閉' +# TODO email_already_used: '&4The email address is already being used' +# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file From 8c6db4a2c98a72b5ea46e1d3fe429525dc3f3f21 Mon Sep 17 00:00:00 2001 From: ljacqu Date: Sun, 14 Feb 2016 18:04:10 +0100 Subject: [PATCH 3/6] Improve logging in SendMailSSL - for #522 --- src/main/java/fr/xephi/authme/mail/SendMailSSL.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/main/java/fr/xephi/authme/mail/SendMailSSL.java b/src/main/java/fr/xephi/authme/mail/SendMailSSL.java index 8279b8dfa..c80001c34 100644 --- a/src/main/java/fr/xephi/authme/mail/SendMailSSL.java +++ b/src/main/java/fr/xephi/authme/mail/SendMailSSL.java @@ -46,8 +46,7 @@ public class SendMailSSL { try { email = initializeMail(auth, settings); } catch (EmailException e) { - ConsoleLogger.showError("Failed to create email with the given settings: " - + StringUtils.formatException(e)); + ConsoleLogger.logException("Failed to create email with the given settings:", e); return; } @@ -59,8 +58,8 @@ public class SendMailSSL { 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)); + ConsoleLogger.logException( + "Unable to send new password as image for email " + auth.getEmail() + ":", e); } } @@ -114,15 +113,14 @@ public class SendMailSSL { 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)); + ConsoleLogger.logException("Your email.html config contains an error and cannot be sent:", e); return false; } try { email.send(); return true; } catch (EmailException e) { - ConsoleLogger.showError("Failed to send a mail to " + email.getToAddresses() + ": " + e.getMessage()); + ConsoleLogger.logException("Failed to send a mail to " + email.getToAddresses() + ":", e); return false; } } From 76e7728b376c44bbaf67269df12aeb8daf640335 Mon Sep 17 00:00:00 2001 From: Gabriele C Date: Sun, 14 Feb 2016 19:19:05 +0100 Subject: [PATCH 4/6] Don't relocate email dependency atm Fix https://github.com/Xephi/AuthMeReloaded/issues/522 --- pom.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pom.xml b/pom.xml index 7651f6605..115550947 100644 --- a/pom.xml +++ b/pom.xml @@ -170,6 +170,7 @@ org.mcstats fr.xephi.authme + com.zaxxer.hikari fr.xephi.authme.libs.hikari @@ -223,6 +225,7 @@ org.mcstats fr.xephi.authme + com.zaxxer.hikari fr.xephi.authme.libs.hikari From 7f3246e416bff18167c31005629020595099477f Mon Sep 17 00:00:00 2001 From: ljacqu Date: Sun, 14 Feb 2016 21:43:01 +0100 Subject: [PATCH 5/6] #519 #515 #431 Tool task to update all docs; relocate to root/docs - Move docs from src/tools to a root subfolder - Add tag for displaying a "generated page" footer - Create task to run all doc tasks - Remove map builder in favor of Guava's --- {src/tools/docs => docs}/commands.md | 32 +++++++------ {src/tools/docs => docs}/hash_algorithms.md | 13 ++++-- {src/tools/docs => docs}/permission_nodes.md | 6 ++- src/tools/ToolsRunner.java | 4 +- src/tools/commands/CommandPageCreater.java | 15 +++--- src/tools/commands/commands.tpl.md | 2 + src/tools/docs/UpdateDocsTask.java | 46 +++++++++++++++++++ .../EncryptionMethodInfoGatherer.java | 2 +- .../HashAlgorithmsDescriptionTask.java | 20 ++++---- src/tools/hashmethods/hash_algorithms.tpl.md | 2 + .../permissions/PermissionsListWriter.java | 15 +++--- src/tools/permissions/permission_nodes.tpl.md | 2 + src/tools/utils/ANewMap.java | 36 --------------- src/tools/utils/TagReplacer.java | 12 +++-- src/tools/utils/ToolsConstants.java | 4 +- 15 files changed, 124 insertions(+), 87 deletions(-) rename {src/tools/docs => docs}/commands.md (74%) rename {src/tools/docs => docs}/hash_algorithms.md (88%) rename {src/tools/docs => docs}/permission_nodes.md (93%) create mode 100644 src/tools/docs/UpdateDocsTask.java delete mode 100644 src/tools/utils/ANewMap.java diff --git a/src/tools/docs/commands.md b/docs/commands.md similarity index 74% rename from src/tools/docs/commands.md rename to docs/commands.md index 39efe9779..70a752d3e 100644 --- a/src/tools/docs/commands.md +++ b/docs/commands.md @@ -1,12 +1,11 @@ - + ## AuthMe Commands You can use the following commands to use the features of AuthMe. Mandatory arguments are marked with `< >` brackets; optional arguments are enclosed in square brackets (`[ ]`). - **/authme**: The main AuthMeReloaded command. The root for all admin commands. -- **/authme help** [query]: View detailed help pages about AuthMeReloaded commands. - **/authme register** <player> <password>: Register the specified player with the specified password.
Requires `authme.admin.register` - **/authme unregister** <player>: Unregister the specified player. @@ -19,9 +18,9 @@ brackets; optional arguments are enclosed in square brackets (`[ ]`).
Requires `authme.admin.lastlogin` - **/authme accounts** [player]: Display all accounts of a player by his player name or IP.
Requires `authme.admin.accounts` -- **/authme getemail** [player]: Display the email address of the specified player if set. +- **/authme email** [player]: Display the email address of the specified player if set.
Requires `authme.admin.getemail` -- **/authme chgemail** <player> <email>: Change the email address of the specified player. +- **/authme setemail** <player> <email>: Change the email address of the specified player.
Requires `authme.admin.changemail` - **/authme getip** <player>: Get the IP address of the specified online player.
Requires `authme.admin.getip` @@ -35,7 +34,7 @@ brackets; optional arguments are enclosed in square brackets (`[ ]`).
Requires `authme.admin.setfirstspawn` - **/authme purge** <days>: Purge old AuthMeReloaded data longer than the specified amount of days ago.
Requires `authme.admin.purge` -- **/authme resetpos** <player>: Purge the last know position of the specified player. +- **/authme resetpos** <player/*>: Purge the last know position of the specified player or all of them.
Requires `authme.admin.purgelastpos` - **/authme purgebannedplayers**: Purge all AuthMeReloaded data for banned players.
Requires `authme.admin.purgebannedplayers` @@ -44,33 +43,38 @@ brackets; optional arguments are enclosed in square brackets (`[ ]`). - **/authme reload**: Reload the AuthMeReloaded plugin.
Requires `authme.admin.reload` - **/authme version**: Show detailed information about the installed AuthMeReloaded version, the developers, contributors, and license. +- **/authme help** [query]: View detailed help for /authme commands. - **/login** <password>: Command to log in using AuthMeReloaded.
Requires `authme.player.login` -- **/login help** [query]: View detailed help pages about AuthMeReloaded login commands. +- **/login help** [query]: View detailed help for /login commands. - **/logout**: Command to logout using AuthMeReloaded.
Requires `authme.player.logout` -- **/logout help** [query]: View detailed help pages about AuthMeReloaded logout commands. -- **/register** <password> [verifyPassword]: Command to register using AuthMeReloaded. +- **/logout help** [query]: View detailed help for /logout commands. +- **/register** [password] [verifyPassword]: Command to register using AuthMeReloaded.
Requires `authme.player.register` -- **/register help** [query]: View detailed help pages about AuthMeReloaded register commands. +- **/register help** [query]: View detailed help for /register commands. - **/unreg** <password>: Command to unregister using AuthMeReloaded.
Requires `authme.player.unregister` -- **/unreg help** [query]: View detailed help pages about AuthMeReloaded unregister commands. +- **/unreg help** [query]: View detailed help for /unreg commands. - **/changepassword** <oldPassword> <newPassword>: Command to change your password using AuthMeReloaded.
Requires `authme.player.changepassword` -- **/changepassword help** [query]: View detailed help pages about AuthMeReloaded changepassword commands. +- **/changepassword help** [query]: View detailed help for /changepassword commands. - **/email**: The AuthMeReloaded Email command base. -- **/email help** [query]: View detailed help pages about AuthMeReloaded email commands. - **/email add** <email> <verifyEmail>: Add a new email address to your account.
Requires `authme.player.email.add` - **/email change** <oldEmail> <newEmail>: Change an email address of your account.
Requires `authme.player.email.change` - **/email recover** <email>: Recover your account using an Email address by sending a mail containing a new password.
Requires `authme.player.email.recover` +- **/email help** [query]: View detailed help for /email commands. - **/captcha** <captcha>: Captcha command for AuthMeReloaded.
Requires `authme.player.captcha` -- **/captcha help** [query]: View detailed help pages about AuthMeReloaded captcha commands. +- **/captcha help** [query]: View detailed help for /captcha commands. - **/converter** <job>: Converter command for AuthMeReloaded.
Requires `authme.admin.converter` -- **/converter help** [query]: View detailed help pages about AuthMeReloaded converter commands. +- **/converter help** [query]: View detailed help for /converter commands. + +--- + +This page was automatically generated on the [AuthMe-Team/AuthMeReloaded repository](https://github.com/AuthMe-Team/AuthMeReloaded/tree/master/docs/) on Sun Feb 14 19:00:30 CET 2016 diff --git a/src/tools/docs/hash_algorithms.md b/docs/hash_algorithms.md similarity index 88% rename from src/tools/docs/hash_algorithms.md rename to docs/hash_algorithms.md index 60a011b4c..a8ba9c6f7 100644 --- a/src/tools/docs/hash_algorithms.md +++ b/docs/hash_algorithms.md @@ -1,5 +1,5 @@ - + ## Hash Algorithms AuthMe supports the following hash algorithms for storing your passwords safely. @@ -12,6 +12,7 @@ BCRYPT2Y | Recommended | 60 | | | Text | 22 | CRAZYCRYPT1 | Do not use | 128 | | | Username | | DOUBLEMD5 | Do not use | 32 | | | None | | IPB3 | Acceptable | 32 | | | Text | 5 | Y +IPB4 | Does not work | 60 | | | Text | 22 | Y JOOMLA | Recommended | 65 | | | Text | 32 | MD5 | Do not use | 32 | | | None | | MD5VB | Acceptable | 56 | | | Text | 16 | @@ -27,11 +28,13 @@ SHA1 | Do not use | 40 | | | None | | SHA256 | Recommended | 86 | | | Text | 16 | SHA512 | Do not use | 128 | | | None | | SMF | Do not use | 40 | | | Username | | +TWO_FACTOR | Does not work | 16 | | | None | | WBB3 | Acceptable | 40 | | | Text | 40 | Y -WBB4 | Does not work | 60 | | | Text | 8 | +WBB4 | Recommended | 60 | | | Text | 8 | WHIRLPOOL | Do not use | 128 | | | None | | -WORDPRESS | Do not use | 34 | | | Text | 9 | +WORDPRESS | Acceptable | 34 | | | Text | 9 | XAUTH | Recommended | 140 | | | Text | 12 | +XFBCRYPT | | 60 | | | | | CUSTOM | | | | | | | | @@ -76,3 +79,7 @@ If this column is empty when the salt type is "Text", it typically means the sal ##### Separate If denoted with a **y**, it means that the salt is stored in a separate column in the database. This is neither good or bad. + +--- + +This page was automatically generated on the [AuthMe-Team/AuthMeReloaded repository](https://github.com/AuthMe-Team/AuthMeReloaded/tree/master/docs/) on Sun Feb 14 19:00:32 CET 2016 diff --git a/src/tools/docs/permission_nodes.md b/docs/permission_nodes.md similarity index 93% rename from src/tools/docs/permission_nodes.md rename to docs/permission_nodes.md index f7ff5df6e..457f1102d 100644 --- a/src/tools/docs/permission_nodes.md +++ b/docs/permission_nodes.md @@ -1,5 +1,5 @@ - + ## AuthMe Permission Nodes The following are the permission nodes that are currently supported by the latest dev builds. @@ -42,3 +42,7 @@ The following are the permission nodes that are currently supported by the lates - **authme.player.unregister** – Command permission to unregister. - **authme.vip** – Permission node to identify VIP users. + +--- + +This page was automatically generated on the [AuthMe-Team/AuthMeReloaded repository](https://github.com/AuthMe-Team/AuthMeReloaded/tree/master/docs/) on Sun Feb 14 19:00:34 CET 2016 diff --git a/src/tools/ToolsRunner.java b/src/tools/ToolsRunner.java index eddedc66b..d920b23f6 100644 --- a/src/tools/ToolsRunner.java +++ b/src/tools/ToolsRunner.java @@ -5,9 +5,9 @@ import java.io.File; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Modifier; -import java.util.HashMap; import java.util.Map; import java.util.Scanner; +import java.util.TreeMap; /** * Runner for executing tool tasks. @@ -25,7 +25,7 @@ public final class ToolsRunner { public static void main(String... args) { // Collect tasks and show them File toolsFolder = new File(ToolsConstants.TOOLS_SOURCE_ROOT); - Map tasks = new HashMap<>(); + Map tasks = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); collectTasksInDirectory(toolsFolder, tasks); listAllTasks(tasks); diff --git a/src/tools/commands/CommandPageCreater.java b/src/tools/commands/CommandPageCreater.java index 3cdc50319..56d417223 100644 --- a/src/tools/commands/CommandPageCreater.java +++ b/src/tools/commands/CommandPageCreater.java @@ -1,12 +1,12 @@ package commands; +import com.google.common.collect.ImmutableMap; import fr.xephi.authme.command.CommandArgumentDescription; import fr.xephi.authme.command.CommandDescription; import fr.xephi.authme.command.CommandInitializer; import fr.xephi.authme.command.CommandPermissions; import fr.xephi.authme.command.CommandUtils; import fr.xephi.authme.permission.PermissionNode; -import utils.ANewMap; import utils.FileUtils; import utils.TagReplacer; import utils.ToolTask; @@ -38,19 +38,18 @@ public class CommandPageCreater implements ToolTask { FileUtils.generateFileFromTemplate( ToolsConstants.TOOLS_SOURCE_ROOT + "commands/commands.tpl.md", OUTPUT_FILE, - ANewMap.with("commands", commandsResult.toString()).build()); + ImmutableMap.of("commands", commandsResult.toString())); System.out.println("Wrote to '" + OUTPUT_FILE + "' with " + baseCommands.size() + " base commands."); } private static void addCommandsInfo(StringBuilder sb, Collection commands, final String template) { for (CommandDescription command : commands) { - Map tags = ANewMap - .with("command", CommandUtils.constructCommandPath(command)) - .and("description", command.getDetailedDescription()) - .and("arguments", formatArguments(command.getArguments())) - .and("permissions", formatPermissions(command.getCommandPermissions())) - .build(); + Map tags = ImmutableMap.of( + "command", CommandUtils.constructCommandPath(command), + "description", command.getDetailedDescription(), + "arguments", formatArguments(command.getArguments()), + "permissions", formatPermissions(command.getCommandPermissions())); sb.append(TagReplacer.applyReplacements(template, tags)); if (!command.getChildren().isEmpty()) { diff --git a/src/tools/commands/commands.tpl.md b/src/tools/commands/commands.tpl.md index c983ba4ce..0815e6ce4 100644 --- a/src/tools/commands/commands.tpl.md +++ b/src/tools/commands/commands.tpl.md @@ -6,3 +6,5 @@ You can use the following commands to use the features of AuthMe. Mandatory argu brackets; optional arguments are enclosed in square brackets (`[ ]`). {commands} + +{gen_footer} diff --git a/src/tools/docs/UpdateDocsTask.java b/src/tools/docs/UpdateDocsTask.java new file mode 100644 index 000000000..ccd0ed1b5 --- /dev/null +++ b/src/tools/docs/UpdateDocsTask.java @@ -0,0 +1,46 @@ +package docs; + +import com.google.common.collect.ImmutableSet; +import commands.CommandPageCreater; +import hashmethods.HashAlgorithmsDescriptionTask; +import permissions.PermissionsListWriter; +import utils.ToolTask; + +import java.util.Scanner; +import java.util.Set; + +/** + * Task that runs all tasks which update files in the docs folder. + */ +public class UpdateDocsTask implements ToolTask { + + private final Set> TASKS = ImmutableSet.of( + CommandPageCreater.class, HashAlgorithmsDescriptionTask.class, PermissionsListWriter.class); + + @Override + public String getTaskName() { + return "updateDocs"; + } + + @Override + public void execute(Scanner scanner) { + for (Class taskClass : TASKS) { + try { + ToolTask task = instantiateTask(taskClass); + System.out.println("\nRunning " + task.getTaskName() + "\n-------------------"); + task.execute(scanner); + } catch (UnsupportedOperationException e) { + System.err.println("Error running task of class '" + taskClass + "'"); + e.printStackTrace(); + } + } + } + + private static ToolTask instantiateTask(Class clazz) { + try { + return clazz.newInstance(); + } catch (IllegalAccessException | InstantiationException e) { + throw new UnsupportedOperationException(e); + } + } +} diff --git a/src/tools/hashmethods/EncryptionMethodInfoGatherer.java b/src/tools/hashmethods/EncryptionMethodInfoGatherer.java index 07c588ea5..237215aff 100644 --- a/src/tools/hashmethods/EncryptionMethodInfoGatherer.java +++ b/src/tools/hashmethods/EncryptionMethodInfoGatherer.java @@ -16,7 +16,7 @@ import java.util.Set; import static com.google.common.collect.Sets.newHashSet; /** - * Gathers information on {@link fr.xephi.authme.security.crypts.EncryptionMethod} implementations based on + * Gathers information on {@link EncryptionMethod} implementations based on * the annotations in {@link fr.xephi.authme.security.crypts.description}. */ public class EncryptionMethodInfoGatherer { diff --git a/src/tools/hashmethods/HashAlgorithmsDescriptionTask.java b/src/tools/hashmethods/HashAlgorithmsDescriptionTask.java index 5213d6b7d..129242b38 100644 --- a/src/tools/hashmethods/HashAlgorithmsDescriptionTask.java +++ b/src/tools/hashmethods/HashAlgorithmsDescriptionTask.java @@ -1,9 +1,9 @@ package hashmethods; +import com.google.common.collect.ImmutableMap; import fr.xephi.authme.security.HashAlgorithm; import fr.xephi.authme.settings.Settings; import fr.xephi.authme.util.WrapperMock; -import utils.ANewMap; import utils.FileUtils; import utils.TagReplacer; import utils.ToolTask; @@ -36,7 +36,7 @@ public class HashAlgorithmsDescriptionTask implements ToolTask { final String methodRows = constructMethodRows(descriptions); // Write to the docs file - Map tags = ANewMap.with("method_rows", methodRows).build(); + Map tags = ImmutableMap.of("method_rows", methodRows); FileUtils.generateFileFromTemplate(CUR_FOLDER + "hash_algorithms.tpl.md", OUTPUT_FILE, tags); } @@ -45,14 +45,14 @@ public class HashAlgorithmsDescriptionTask implements ToolTask { StringBuilder result = new StringBuilder(); for (Map.Entry entry : descriptions.entrySet()) { MethodDescription description = entry.getValue(); - Map tags = ANewMap - .with("name", asString(entry.getKey())) - .and("recommendation", asString(description.getUsage())) - .and("hash_length", asString(description.getHashLength())) - .and("ascii_restricted", asString(description.isAsciiRestricted())) - .and("salt_type", asString(description.getSaltType())) - .and("salt_length", asString(description.getSaltLength())) - .and("separate_salt", asString(description.hasSeparateSalt())) + Map tags = ImmutableMap.builder() + .put("name", asString(entry.getKey())) + .put("recommendation", asString(description.getUsage())) + .put("hash_length", asString(description.getHashLength())) + .put("ascii_restricted", asString(description.isAsciiRestricted())) + .put("salt_type", asString(description.getSaltType())) + .put("salt_length", asString(description.getSaltLength())) + .put("separate_salt", asString(description.hasSeparateSalt())) .build(); result.append(TagReplacer.applyReplacements(rowTemplate, tags)); } diff --git a/src/tools/hashmethods/hash_algorithms.tpl.md b/src/tools/hashmethods/hash_algorithms.tpl.md index b466eeebd..883ae3239 100644 --- a/src/tools/hashmethods/hash_algorithms.tpl.md +++ b/src/tools/hashmethods/hash_algorithms.tpl.md @@ -51,3 +51,5 @@ If this column is empty when the salt type is "Text", it typically means the sal ##### Separate If denoted with a **y**, it means that the salt is stored in a separate column in the database. This is neither good or bad. + +{gen_footer} diff --git a/src/tools/permissions/PermissionsListWriter.java b/src/tools/permissions/PermissionsListWriter.java index 5958e0770..7c5999941 100644 --- a/src/tools/permissions/PermissionsListWriter.java +++ b/src/tools/permissions/PermissionsListWriter.java @@ -1,6 +1,6 @@ package permissions; -import utils.ANewMap; +import com.google.common.collect.ImmutableMap; import utils.FileUtils; import utils.TagReplacer; import utils.ToolTask; @@ -31,8 +31,8 @@ public class PermissionsListWriter implements ToolTask { boolean writeToFile = false; if (includeDescription) { - System.out.println("Write to file? [Enter 'y' for yes]"); - writeToFile = matches("y", scanner); + System.out.println("Write to file? [Enter 'n' for no]"); + writeToFile = !matches("n", scanner); } if (!includeDescription) { @@ -47,7 +47,7 @@ public class PermissionsListWriter implements ToolTask { private static void generateAndWriteFile() { final String permissionsTagValue = generatePermissionsList(); - Map tags = ANewMap.with("permissions", permissionsTagValue).build(); + Map tags = ImmutableMap.of("permissions", permissionsTagValue); FileUtils.generateFileFromTemplate( ToolsConstants.TOOLS_SOURCE_ROOT + "permissions/permission_nodes.tpl.md", PERMISSIONS_OUTPUT_FILE, tags); System.out.println("Wrote to '" + PERMISSIONS_OUTPUT_FILE + "'"); @@ -62,10 +62,9 @@ public class PermissionsListWriter implements ToolTask { StringBuilder sb = new StringBuilder(); for (Map.Entry entry : permissions.entrySet()) { - Map tags = ANewMap - .with("node", entry.getKey()) - .and("description", entry.getValue()) - .build(); + Map tags = ImmutableMap.of( + "node", entry.getKey(), + "description", entry.getValue()); sb.append(TagReplacer.applyReplacements(template, tags)); } return sb.toString(); diff --git a/src/tools/permissions/permission_nodes.tpl.md b/src/tools/permissions/permission_nodes.tpl.md index 641d28dfa..1f4208090 100644 --- a/src/tools/permissions/permission_nodes.tpl.md +++ b/src/tools/permissions/permission_nodes.tpl.md @@ -5,3 +5,5 @@ The following are the permission nodes that are currently supported by the latest dev builds. {permissions} + +{gen_footer} diff --git a/src/tools/utils/ANewMap.java b/src/tools/utils/ANewMap.java deleted file mode 100644 index de37bd746..000000000 --- a/src/tools/utils/ANewMap.java +++ /dev/null @@ -1,36 +0,0 @@ -package utils; - -import java.util.HashMap; -import java.util.Map; - -/** - * A map builder for the lazy. - *

- * Sample usage: - * - * Map<String, Integer> map = ANewMap - * .with("test", 123) - * .and("text", 938) - * .and("abc", 456) - * .build(); - * - */ -public class ANewMap { - - private Map map = new HashMap<>(); - - public static ANewMap with(K key, V value) { - ANewMap instance = new ANewMap<>(); - return instance.and(key, value); - } - - public ANewMap and(K key, V value) { - map.put(key, value); - return this; - } - - public Map build() { - return map; - } - -} diff --git a/src/tools/utils/TagReplacer.java b/src/tools/utils/TagReplacer.java index 7f359b4df..8e75ecd02 100644 --- a/src/tools/utils/TagReplacer.java +++ b/src/tools/utils/TagReplacer.java @@ -11,8 +11,10 @@ import java.util.regex.Pattern; * Class responsible for replacing template tags to actual content. * For all files, the following tags are defined: *

    - *
  • {gen_date} – the generation date
  • + *
  • {gen_date} – the generation date
  • *
  • {gen_warning} - warning not to edit the generated file directly
  • + *
  • {gen_footer} - info footer with a link to the dev repo so users can find the most up-to-date + * version (in case the page is viewed on a fork)
  • *
*/ public class TagReplacer { @@ -47,9 +49,13 @@ public class TagReplacer { * @return The filled template */ public static String applyReplacements(String template) { + String curDate = new Date().toString(); return template - .replace("{gen_date}", new Date().toString()) - .replace("{gen_warning}", "AUTO-GENERATED FILE! Do not edit this directly"); + .replace("{gen_date}", curDate) + .replace("{gen_warning}", "AUTO-GENERATED FILE! Do not edit this directly") + .replace("{gen_footer}", "---\n\nThis page was automatically generated on the" + + " [AuthMe-Team/AuthMeReloaded repository](" + ToolsConstants.DOCS_FOLDER_URL + ")" + + " on " + curDate); } private static String replaceOptionalTag(String text, String tagName, String tagValue) { diff --git a/src/tools/utils/ToolsConstants.java b/src/tools/utils/ToolsConstants.java index e36ade989..504a1be79 100644 --- a/src/tools/utils/ToolsConstants.java +++ b/src/tools/utils/ToolsConstants.java @@ -14,6 +14,8 @@ public final class ToolsConstants { public static final String TOOLS_SOURCE_ROOT = "src/tools/"; - public static final String DOCS_FOLDER = TOOLS_SOURCE_ROOT + "docs/"; + public static final String DOCS_FOLDER = "docs/"; + + public static final String DOCS_FOLDER_URL = "https://github.com/AuthMe-Team/AuthMeReloaded/tree/master/docs/"; } From f5b5595f085850658468445b1b0140f4e88c7030 Mon Sep 17 00:00:00 2001 From: ljacqu Date: Sun, 14 Feb 2016 21:46:47 +0100 Subject: [PATCH 6/6] #525 Make "not owner" kick reason translatable --- src/main/java/fr/xephi/authme/output/MessageKey.java | 4 +++- .../java/fr/xephi/authme/process/join/AsynchronousJoin.java | 3 +-- src/main/resources/messages/messages_bg.yml | 3 ++- src/main/resources/messages/messages_br.yml | 3 ++- src/main/resources/messages/messages_cz.yml | 3 ++- src/main/resources/messages/messages_de.yml | 3 ++- src/main/resources/messages/messages_en.yml | 1 + src/main/resources/messages/messages_es.yml | 3 ++- src/main/resources/messages/messages_eu.yml | 3 ++- src/main/resources/messages/messages_fi.yml | 3 ++- src/main/resources/messages/messages_fr.yml | 3 ++- src/main/resources/messages/messages_gl.yml | 3 ++- src/main/resources/messages/messages_hu.yml | 1 + src/main/resources/messages/messages_id.yml | 1 + src/main/resources/messages/messages_it.yml | 3 ++- src/main/resources/messages/messages_ko.yml | 3 ++- src/main/resources/messages/messages_lt.yml | 3 ++- src/main/resources/messages/messages_nl.yml | 3 ++- src/main/resources/messages/messages_pl.yml | 3 ++- src/main/resources/messages/messages_pt.yml | 3 ++- src/main/resources/messages/messages_ru.yml | 3 ++- src/main/resources/messages/messages_sk.yml | 3 ++- src/main/resources/messages/messages_tr.yml | 3 ++- src/main/resources/messages/messages_uk.yml | 3 ++- src/main/resources/messages/messages_vn.yml | 3 ++- src/main/resources/messages/messages_zhcn.yml | 3 ++- src/main/resources/messages/messages_zhhk.yml | 1 + src/main/resources/messages/messages_zhtw.yml | 3 ++- 28 files changed, 52 insertions(+), 25 deletions(-) diff --git a/src/main/java/fr/xephi/authme/output/MessageKey.java b/src/main/java/fr/xephi/authme/output/MessageKey.java index 73fb08fc2..d5e601207 100644 --- a/src/main/java/fr/xephi/authme/output/MessageKey.java +++ b/src/main/java/fr/xephi/authme/output/MessageKey.java @@ -125,7 +125,9 @@ public enum MessageKey { EMAIL_ALREADY_USED_ERROR("email_already_used"), - TWO_FACTOR_CREATE("two_factor_create", "%code", "%url"); + TWO_FACTOR_CREATE("two_factor_create", "%code", "%url"), + + NOT_OWNER_ERROR("not_owner_error"); private String key; private String[] tags; diff --git a/src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java b/src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java index 052045b6c..db678ad10 100644 --- a/src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java +++ b/src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java @@ -12,7 +12,6 @@ import fr.xephi.authme.events.SpawnTeleportEvent; import fr.xephi.authme.listener.AuthMePlayerListener; import fr.xephi.authme.output.MessageKey; import fr.xephi.authme.output.Messages; -import fr.xephi.authme.permission.PlayerPermission; import fr.xephi.authme.permission.PlayerStatePermission; import fr.xephi.authme.settings.Settings; import fr.xephi.authme.settings.Spawn; @@ -71,7 +70,7 @@ public class AsynchronousJoin { @Override public void run() { AuthMePlayerListener.causeByAuthMe.putIfAbsent(name, true); - player.kickPlayer("You are not the owner of this account. Please try another name!"); + player.kickPlayer(m.retrieveSingle(MessageKey.NOT_OWNER_ERROR)); if (Settings.banUnsafeIp) plugin.getServer().banIP(ip); } diff --git a/src/main/resources/messages/messages_bg.yml b/src/main/resources/messages/messages_bg.yml index d77c22c0c..4370c00b7 100644 --- a/src/main/resources/messages/messages_bg.yml +++ b/src/main/resources/messages/messages_bg.yml @@ -59,4 +59,5 @@ antibot_auto_disabled: '[AuthMe] AntiBotMod автоматично изключ # TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' # TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:' # TODO invalid_session: '&cYour IP has been changed and your session data has expired!' -# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' +# TODO not_owner_error: 'You are not the owner of this account. Please try another name!' \ No newline at end of file diff --git a/src/main/resources/messages/messages_br.yml b/src/main/resources/messages/messages_br.yml index f93890976..dfaab23dd 100644 --- a/src/main/resources/messages/messages_br.yml +++ b/src/main/resources/messages/messages_br.yml @@ -61,4 +61,5 @@ antibot_auto_enabled: '&4[AntiBotService] AntiBot ativado devido ao grande núme antibot_auto_disabled: '&2[AntiBotService] AntiBot desativado após %m minutos!' # TODO two_factor_create: Missing tag %url two_factor_create: '&2Seu código secreto é %code' -# TODO email_already_used: '&4The email address is already being used' \ No newline at end of file +# TODO email_already_used: '&4The email address is already being used' +# TODO not_owner_error: 'You are not the owner of this account. Please try another name!' \ No newline at end of file diff --git a/src/main/resources/messages/messages_cz.yml b/src/main/resources/messages/messages_cz.yml index 4367b45ff..d56a6d423 100644 --- a/src/main/resources/messages/messages_cz.yml +++ b/src/main/resources/messages/messages_cz.yml @@ -58,4 +58,5 @@ antibot_auto_disabled: '[AuthMe] AntiBotMod automaticky ukoncen po %m minutach, # TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...' # TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' # TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:' -# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' +# TODO not_owner_error: 'You are not the owner of this account. Please try another name!' \ No newline at end of file diff --git a/src/main/resources/messages/messages_de.yml b/src/main/resources/messages/messages_de.yml index cda527d1d..eb62ce309 100644 --- a/src/main/resources/messages/messages_de.yml +++ b/src/main/resources/messages/messages_de.yml @@ -59,4 +59,5 @@ antibot_auto_disabled: '&2[AntiBotService] AntiBotMod wurde nach %m Minuten deak kick_antibot: 'AntiBotMod ist aktiviert! Bitte warte einige Minuten, bevor du dich mit dem Server verbindest' # TODO two_factor_create: Missing tag %url two_factor_create: '&2Dein geheimer Code ist %code' -# TODO email_already_used: '&4The email address is already being used' \ No newline at end of file +# TODO email_already_used: '&4The email address is already being used' +# TODO not_owner_error: 'You are not the owner of this account. Please try another name!' \ No newline at end of file diff --git a/src/main/resources/messages/messages_en.yml b/src/main/resources/messages/messages_en.yml index a1cf19e1c..0b7c96bfb 100644 --- a/src/main/resources/messages/messages_en.yml +++ b/src/main/resources/messages/messages_en.yml @@ -59,3 +59,4 @@ antibot_auto_enabled: '&4[AntiBotService] AntiBot enabled due to the huge number antibot_auto_disabled: '&2[AntiBotService] AntiBot disabled disabled after %m minutes!' email_already_used: '&4The email address is already being used' two_factor_create: '&2Your secret code is %code. You can scan it from here %url' +not_owner_error: 'You are not the owner of this account. Please try another name!' diff --git a/src/main/resources/messages/messages_es.yml b/src/main/resources/messages/messages_es.yml index 138beb392..6fd0dbc19 100644 --- a/src/main/resources/messages/messages_es.yml +++ b/src/main/resources/messages/messages_es.yml @@ -59,4 +59,5 @@ antibot_auto_disabled: '[AuthMe] AntiBotMod desactivado automáticamente luego d # TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...' # TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' # TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:' -# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' +# TODO not_owner_error: 'You are not the owner of this account. Please try another name!' \ No newline at end of file diff --git a/src/main/resources/messages/messages_eu.yml b/src/main/resources/messages/messages_eu.yml index 1cbd90d45..bddf751d7 100644 --- a/src/main/resources/messages/messages_eu.yml +++ b/src/main/resources/messages/messages_eu.yml @@ -58,4 +58,5 @@ country_banned: '[AuthMe] Zure herrialdea blokeatuta dago zerbitzari honetan' # TODO usage_captcha: '&3To login you have to solve a captcha code, please use the command "/captcha "' # TODO antibot_auto_disabled: '&2[AntiBotService] AntiBot disabled disabled after %m minutes!' # TODO valid_captcha: '&2Captcha code solved correctly!' -# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' +# TODO not_owner_error: 'You are not the owner of this account. Please try another name!' \ No newline at end of file diff --git a/src/main/resources/messages/messages_fi.yml b/src/main/resources/messages/messages_fi.yml index df667849f..2e26e512d 100644 --- a/src/main/resources/messages/messages_fi.yml +++ b/src/main/resources/messages/messages_fi.yml @@ -58,4 +58,5 @@ email_send: '[AuthMe] Palautus sähköposti lähetetty!' # TODO country_banned: '&4Your country is banned from this server!' # TODO antibot_auto_enabled: '&4[AntiBotService] AntiBot enabled due to the huge number of connections!' # TODO antibot_auto_disabled: '&2[AntiBotService] AntiBot disabled disabled after %m minutes!' -# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' +# TODO not_owner_error: 'You are not the owner of this account. Please try another name!' \ No newline at end of file diff --git a/src/main/resources/messages/messages_fr.yml b/src/main/resources/messages/messages_fr.yml index 17535768f..31a944714 100644 --- a/src/main/resources/messages/messages_fr.yml +++ b/src/main/resources/messages/messages_fr.yml @@ -60,4 +60,5 @@ kick_antibot: 'AntiBotMod est activé ! Veuillez attendre quelques minutes avant email_exists: '&cUn email de restauration a déjà été envoyé ! Vous pouvez le jeter et vous en faire envoyez un nouveau en utilisant :' # TODO two_factor_create: Missing tag %url two_factor_create: '&2Votre code secret est %code' -# TODO email_already_used: '&4The email address is already being used' \ No newline at end of file +# TODO email_already_used: '&4The email address is already being used' +# TODO not_owner_error: 'You are not the owner of this account. Please try another name!' \ No newline at end of file diff --git a/src/main/resources/messages/messages_gl.yml b/src/main/resources/messages/messages_gl.yml index 26fd5a95b..3dfeb88d3 100644 --- a/src/main/resources/messages/messages_gl.yml +++ b/src/main/resources/messages/messages_gl.yml @@ -60,4 +60,5 @@ antibot_auto_disabled: '[AuthMe] AntiBotMod desactivouse automáticamente despo # TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...' # TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' # TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:' -# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' +# TODO not_owner_error: 'You are not the owner of this account. Please try another name!' \ No newline at end of file diff --git a/src/main/resources/messages/messages_hu.yml b/src/main/resources/messages/messages_hu.yml index 1766e9e4c..504364546 100644 --- a/src/main/resources/messages/messages_hu.yml +++ b/src/main/resources/messages/messages_hu.yml @@ -59,3 +59,4 @@ antibot_auto_disabled: '&2[AntiBot] Az AntiBot kikapcsol %m múlva!' kick_antibot: 'Az AntiBot védelem bekapcsolva! Kérünk várj pár másodpercet a csatlakozáshoz.' # TODO email_already_used: '&4The email address is already being used' # TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' +# TODO not_owner_error: 'You are not the owner of this account. Please try another name!' \ No newline at end of file diff --git a/src/main/resources/messages/messages_id.yml b/src/main/resources/messages/messages_id.yml index e26f3230a..528357560 100644 --- a/src/main/resources/messages/messages_id.yml +++ b/src/main/resources/messages/messages_id.yml @@ -58,4 +58,5 @@ antibot_auto_disabled: '&2[AntiBotService] AntiBot dimatikan setelah %m menit!' # TODO country_banned: '&4Your country is banned from this server!' # TODO usage_unreg: '&cUsage: /unregister ' # TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' +# TODO not_owner_error: 'You are not the owner of this account. Please try another name!' # TODO usage_reg: '&cUsage: /register ' \ No newline at end of file diff --git a/src/main/resources/messages/messages_it.yml b/src/main/resources/messages/messages_it.yml index e470671c2..abc943fc4 100644 --- a/src/main/resources/messages/messages_it.yml +++ b/src/main/resources/messages/messages_it.yml @@ -59,4 +59,5 @@ antibot_auto_enabled: 'Il servizio di AntiBot è stato automaticamente abilitato antibot_auto_disabled: "Il servizio di AntiBot è stato automaticamente disabilitato dopo %m Minuti, sperando che l'attacco sia finito!" kick_antibot: 'Il servizio di AntiBot è attualmente attivo! Devi aspettare qualche minuto prima di poter entrare nel server.' two_factor_create: '&2Il tuo codice segreto è: &f%code&n&2Puoi anche scannerizzare il codice QR da qui: &f%url' -# TODO email_already_used: '&4The email address is already being used' \ No newline at end of file +# TODO email_already_used: '&4The email address is already being used' +# TODO not_owner_error: 'You are not the owner of this account. Please try another name!' \ No newline at end of file diff --git a/src/main/resources/messages/messages_ko.yml b/src/main/resources/messages/messages_ko.yml index 81296342f..32ad61663 100644 --- a/src/main/resources/messages/messages_ko.yml +++ b/src/main/resources/messages/messages_ko.yml @@ -61,4 +61,5 @@ antibot_auto_disabled: '[AuthMe] 봇차단모드가 %m 분 후에 자동적으 # TODO password_error_nick: '&cYou can''t use your name as password, please choose another one...' # TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...' # TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' -# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' +# TODO not_owner_error: 'You are not the owner of this account. Please try another name!' \ No newline at end of file diff --git a/src/main/resources/messages/messages_lt.yml b/src/main/resources/messages/messages_lt.yml index 530303b53..a432b62a9 100644 --- a/src/main/resources/messages/messages_lt.yml +++ b/src/main/resources/messages/messages_lt.yml @@ -58,4 +58,5 @@ kick_fullserver: '&cServeris yra pilnas, Atsiprasome.' # TODO antibot_auto_enabled: '&4[AntiBotService] AntiBot enabled due to the huge number of connections!' # TODO usage_email_add: '&cUsage: /email add ' # TODO email_invalid: '&cInvalid email address, try again!' -# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' +# TODO not_owner_error: 'You are not the owner of this account. Please try another name!' \ No newline at end of file diff --git a/src/main/resources/messages/messages_nl.yml b/src/main/resources/messages/messages_nl.yml index 60ab89c5e..bf662ce7c 100644 --- a/src/main/resources/messages/messages_nl.yml +++ b/src/main/resources/messages/messages_nl.yml @@ -59,4 +59,5 @@ kick_antibot: 'AntiBot is aangezet! Wacht alsjeblieft enkele minuten voor je met two_factor_create: '&2Je geheime code is %code' # TODO email_already_used: '&4The email address is already being used' # TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:' -# TODO reg_email_msg: '&3Please, register to the server with the command "/register "' \ No newline at end of file +# TODO reg_email_msg: '&3Please, register to the server with the command "/register "' +# TODO not_owner_error: 'You are not the owner of this account. Please try another name!' \ No newline at end of file diff --git a/src/main/resources/messages/messages_pl.yml b/src/main/resources/messages/messages_pl.yml index 4efa88408..506995bd5 100644 --- a/src/main/resources/messages/messages_pl.yml +++ b/src/main/resources/messages/messages_pl.yml @@ -58,4 +58,5 @@ email_send: '[AuthMe] Email z odzyskaniem wyslany!' # TODO country_banned: '&4Your country is banned from this server!' # TODO antibot_auto_enabled: '&4[AntiBotService] AntiBot enabled due to the huge number of connections!' # TODO antibot_auto_disabled: '&2[AntiBotService] AntiBot disabled disabled after %m minutes!' -# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' +# TODO not_owner_error: 'You are not the owner of this account. Please try another name!' \ No newline at end of file diff --git a/src/main/resources/messages/messages_pt.yml b/src/main/resources/messages/messages_pt.yml index db276e97c..5b11aea6b 100644 --- a/src/main/resources/messages/messages_pt.yml +++ b/src/main/resources/messages/messages_pt.yml @@ -59,4 +59,5 @@ antibot_auto_disabled: '[AuthMe] AntiBotMod desactivado automaticamente após %m # TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...' # TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' # TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:' -# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' +# TODO not_owner_error: 'You are not the owner of this account. Please try another name!' \ No newline at end of file diff --git a/src/main/resources/messages/messages_ru.yml b/src/main/resources/messages/messages_ru.yml index 454361916..3c34794e9 100644 --- a/src/main/resources/messages/messages_ru.yml +++ b/src/main/resources/messages/messages_ru.yml @@ -58,4 +58,5 @@ antibot_auto_disabled: '&a[AuthMe] AntiBot-режим автоматичски # TODO email_already_used: '&4The email address is already being used' # TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' # TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:' -# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' +# TODO not_owner_error: 'You are not the owner of this account. Please try another name!' \ No newline at end of file diff --git a/src/main/resources/messages/messages_sk.yml b/src/main/resources/messages/messages_sk.yml index 924f452d9..1366e2a95 100644 --- a/src/main/resources/messages/messages_sk.yml +++ b/src/main/resources/messages/messages_sk.yml @@ -61,4 +61,5 @@ recovery_email: '&cZabudol si heslo? Pouzi príkaz /email recovery ' # TODO usage_email_add: '&cUsage: /email add ' # TODO wrong_captcha: '&cWrong captcha, please type "/captcha THE_CAPTCHA" into the chat!' # TODO valid_captcha: '&2Captcha code solved correctly!' -# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' +# TODO not_owner_error: 'You are not the owner of this account. Please try another name!' \ No newline at end of file diff --git a/src/main/resources/messages/messages_tr.yml b/src/main/resources/messages/messages_tr.yml index 40983a4c9..b3603929a 100644 --- a/src/main/resources/messages/messages_tr.yml +++ b/src/main/resources/messages/messages_tr.yml @@ -58,4 +58,5 @@ antibot_auto_disabled: '[AuthMe] AntiBotMode %m dakika sonra otomatik olarak isg # TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...' # TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' # TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:' -# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' +# TODO not_owner_error: 'You are not the owner of this account. Please try another name!' \ No newline at end of file diff --git a/src/main/resources/messages/messages_uk.yml b/src/main/resources/messages/messages_uk.yml index 7b9baa662..6c5db173f 100644 --- a/src/main/resources/messages/messages_uk.yml +++ b/src/main/resources/messages/messages_uk.yml @@ -59,4 +59,5 @@ antibot_auto_disabled: '[AuthMe] AntiBotMod автоматично вимкну # TODO email_already_used: '&4The email address is already being used' # TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' # TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:' -# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' +# TODO not_owner_error: 'You are not the owner of this account. Please try another name!' \ No newline at end of file diff --git a/src/main/resources/messages/messages_vn.yml b/src/main/resources/messages/messages_vn.yml index 164436123..2df8588af 100644 --- a/src/main/resources/messages/messages_vn.yml +++ b/src/main/resources/messages/messages_vn.yml @@ -59,4 +59,5 @@ antibot_auto_disabled: '[AuthMe] AntiBot tự huỷ kích hoạt sau %m phút, h # TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...' # TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' # TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:' -# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' +# TODO not_owner_error: 'You are not the owner of this account. Please try another name!' \ No newline at end of file diff --git a/src/main/resources/messages/messages_zhcn.yml b/src/main/resources/messages/messages_zhcn.yml index 426617934..d1f71209b 100644 --- a/src/main/resources/messages/messages_zhcn.yml +++ b/src/main/resources/messages/messages_zhcn.yml @@ -63,4 +63,5 @@ antibot_auto_disabled: '&8[&6用戶系統&8] 防止機械人程序檢查到不 # TODO email_already_used: '&4The email address is already being used' # TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' # TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:' -# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' +# TODO not_owner_error: 'You are not the owner of this account. Please try another name!' \ No newline at end of file diff --git a/src/main/resources/messages/messages_zhhk.yml b/src/main/resources/messages/messages_zhhk.yml index 4928a0f7e..e18f4109c 100644 --- a/src/main/resources/messages/messages_zhhk.yml +++ b/src/main/resources/messages/messages_zhhk.yml @@ -63,3 +63,4 @@ email_already_used: '&4邮箱已被使用' kick_antibot: '[AuthMe] 防机器人程序已启用 !请稍等几分钟後才再次进入服务器' email_exists: '&c恢复邮件已发送 ! 你可以丢弃它然後使用以下的指令来发送新的邮件:' two_factor_create: '&2你的代码是 %code,你可以使用 %url 来扫描' +# TODO not_owner_error: 'You are not the owner of this account. Please try another name!' \ No newline at end of file diff --git a/src/main/resources/messages/messages_zhtw.yml b/src/main/resources/messages/messages_zhtw.yml index f9dd0d42d..61ed5d88a 100644 --- a/src/main/resources/messages/messages_zhtw.yml +++ b/src/main/resources/messages/messages_zhtw.yml @@ -63,4 +63,5 @@ antibot_auto_enabled: '&b【AuthMe】&6AntiBotMod已自動啟用!' antibot_auto_disabled: '&b【AuthMe】&6AntiBotMod將會於 &c%m &6分鐘後自動關閉' # TODO email_already_used: '&4The email address is already being used' # TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.' -# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' \ No newline at end of file +# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url' +# TODO not_owner_error: 'You are not the owner of this account. Please try another name!' \ No newline at end of file