diff --git a/src/tools/docs/commands.md b/docs/commands.md
similarity index 73%
rename from src/tools/docs/commands.md
rename to docs/commands.md
index 34a743d3..70a752d3 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.
-- **/authme converter** <job>: Converter command for AuthMeReloaded.
+- **/captcha help** [query]: View detailed help for /captcha commands.
+- **/converter** <job>: Converter command for AuthMeReloaded.
Requires `authme.admin.converter`
-- **/authme 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 60a011b4..a8ba9c6f 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 f7ff5df6..457f1102 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/pom.xml b/pom.xml
index 7651f660..11555094 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
diff --git a/src/main/java/fr/xephi/authme/datasource/SQLite.java b/src/main/java/fr/xephi/authme/datasource/SQLite.java
index b971b9cb..14258834 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 + ";");
+ String sql = "DELETE FROM " + tableName + " WHERE " + col.LAST_LOGIN + ";";
+ try (PreparedStatement pst = con.prepareStatement(sql)) {
pst.setLong(1, until);
return pst.executeUpdate();
} catch (SQLException ex) {
- ConsoleLogger.showError(ex.getMessage());
- return 0;
- } finally {
- close(pst);
+ logSqlException(ex);
}
+ return 0;
}
@Override
@@ -299,12 +292,12 @@ public class SQLite implements DataSource {
}
return list;
} catch (SQLException ex) {
- ConsoleLogger.showError(ex.getMessage());
- return new ArrayList<>();
+ 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 {
diff --git a/src/main/java/fr/xephi/authme/mail/SendMailSSL.java b/src/main/java/fr/xephi/authme/mail/SendMailSSL.java
index 8279b8df..c80001c3 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;
}
}
diff --git a/src/main/java/fr/xephi/authme/output/MessageKey.java b/src/main/java/fr/xephi/authme/output/MessageKey.java
index 73fb08fc..d5e60120 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 5d65929a..db678ad1 100644
--- a/src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java
+++ b/src/main/java/fr/xephi/authme/process/join/AsynchronousJoin.java
@@ -70,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 ce477355..4370c00b 100644
--- a/src/main/resources/messages/messages_bg.yml
+++ b/src/main/resources/messages/messages_bg.yml
@@ -53,3 +53,11 @@ 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'
+# 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 922a5b96..dfaab23d 100644
--- a/src/main/resources/messages/messages_br.yml
+++ b/src/main/resources/messages/messages_br.yml
@@ -59,4 +59,7 @@ 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'
+# 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 3098d463..d56a6d42 100644
--- a/src/main/resources/messages/messages_cz.yml
+++ b/src/main/resources/messages/messages_cz.yml
@@ -53,3 +53,10 @@ 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'
+# 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 9a9c0181..eb62ce30 100644
--- a/src/main/resources/messages/messages_de.yml
+++ b/src/main/resources/messages/messages_de.yml
@@ -57,4 +57,7 @@ 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'
+# 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 a1cf19e1..0b7c96bf 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 70b9f830..6fd0dbc1 100644
--- a/src/main/resources/messages/messages_es.yml
+++ b/src/main/resources/messages/messages_es.yml
@@ -54,4 +54,10 @@ 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'
+# 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 5775730b..bddf751d 100644
--- a/src/main/resources/messages/messages_eu.yml
+++ b/src/main/resources/messages/messages_eu.yml
@@ -47,3 +47,16 @@ 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'
+# 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 2702cd53..2e26e512 100644
--- a/src/main/resources/messages/messages_fi.yml
+++ b/src/main/resources/messages/messages_fi.yml
@@ -50,3 +50,13 @@ 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'
+# 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 54ca4f5e..31a94471 100644
--- a/src/main/resources/messages/messages_fr.yml
+++ b/src/main/resources/messages/messages_fr.yml
@@ -58,4 +58,7 @@ 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'
+# 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 019e238b..3dfeb88d 100644
--- a/src/main/resources/messages/messages_gl.yml
+++ b/src/main/resources/messages/messages_gl.yml
@@ -55,3 +55,10 @@ 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'
+# 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 099179f8..50436454 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,6 @@ 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'
+# 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 fd2b1267..52835756 100644
--- a/src/main/resources/messages/messages_id.yml
+++ b/src/main/resources/messages/messages_id.yml
@@ -53,3 +53,10 @@ 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 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 ccf7c5b1..abc943fc 100644
--- a/src/main/resources/messages/messages_it.yml
+++ b/src/main/resources/messages/messages_it.yml
@@ -59,3 +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'
+# 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 8fca8139..32ad6166 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,9 @@ 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'
+# 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 ea5c716a..a432b62a 100644
--- a/src/main/resources/messages/messages_lt.yml
+++ b/src/main/resources/messages/messages_lt.yml
@@ -40,3 +40,23 @@ 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'
+# 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 b3d99273..bf662ce7 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,9 @@ 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 "'
+# 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 b0b937cc..506995bd 100644
--- a/src/main/resources/messages/messages_pl.yml
+++ b/src/main/resources/messages/messages_pl.yml
@@ -50,3 +50,13 @@ 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'
+# 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 f59eba14..5b11aea6 100644
--- a/src/main/resources/messages/messages_pt.yml
+++ b/src/main/resources/messages/messages_pt.yml
@@ -54,3 +54,10 @@ 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'
+# 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 7b1f2a50..3c34794e 100644
--- a/src/main/resources/messages/messages_ru.yml
+++ b/src/main/resources/messages/messages_ru.yml
@@ -55,3 +55,8 @@ 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'
+# 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 398df3eb..1366e2a9 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,28 @@ 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'
+# 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 f84ceac4..b3603929 100644
--- a/src/main/resources/messages/messages_tr.yml
+++ b/src/main/resources/messages/messages_tr.yml
@@ -53,3 +53,10 @@ 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'
+# 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 6b132d8d..6c5db173 100644
--- a/src/main/resources/messages/messages_uk.yml
+++ b/src/main/resources/messages/messages_uk.yml
@@ -54,4 +54,10 @@ 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'
+# 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 ad175e18..2df8588a 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,10 @@ 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'
+# 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 897c052d..d1f71209 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,8 @@ 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'
+# 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 3de59ddc..e18f4109 100644
--- a/src/main/resources/messages/messages_zhhk.yml
+++ b/src/main/resources/messages/messages_zhhk.yml
@@ -59,3 +59,8 @@ 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 来扫描'
+# 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 97e4a0b4..61ed5d88 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,7 @@ 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'
+# 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/tools/ToolsRunner.java b/src/tools/ToolsRunner.java
index eddedc66..d920b23f 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 3cdc5031..56d41722 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 c983ba4c..0815e6ce 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 00000000..ccd0ed1b
--- /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 extends ToolTask> 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 extends ToolTask> 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 07c588ea..237215af 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 5213d6b7..129242b3 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 b466eeeb..883ae323 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 5958e077..7c599994 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 641d28df..1f420809 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 de37bd74..00000000
--- 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 7f359b4d..8e75ecd0 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 e36ade98..504a1be7 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/";
}