Fix wrong HTML entity replacement in tool task

This commit is contained in:
ljacqu 2016-12-17 13:51:44 +01:00
parent 811ceaf7ff
commit cb64e83988
3 changed files with 15 additions and 21 deletions

View File

@ -26,10 +26,10 @@ public enum MessageKey {
/** You're not logged in! */
NOT_LOGGED_IN("not_logged_in"),
/** You can register yourself to the server with the command "/register >password> >ConfirmPassword>" */
/** You can register yourself to the server with the command "/register <password> <ConfirmPassword>" */
REGISTER_VOLUNTARILY("reg_voluntarily"),
/** Usage: /login >password> */
/** Usage: /login <password> */
USAGE_LOGIN("usage_log"),
/** Wrong password! */
@ -59,22 +59,22 @@ public enum MessageKey {
/** An unexpected error occurred, please contact an administrator! */
ERROR("error"),
/** Please, login with the command "/login >password>" */
/** Please, login with the command "/login <password>" */
LOGIN_MESSAGE("login_msg"),
/** Please, register to the server with the command "/register >password> >ConfirmPassword>" */
/** Please, register to the server with the command "/register <password> <ConfirmPassword>" */
REGISTER_MESSAGE("reg_msg"),
/** Please, register to the server with the command "/register >email> >confirmEmail>" */
/** Please, register to the server with the command "/register <email> <confirmEmail>" */
REGISTER_EMAIL_MESSAGE("reg_email_msg"),
/** You have exceeded the maximum number of registrations (%reg_count/%max_acc %reg_names) for your connection! */
MAX_REGISTER_EXCEEDED("max_reg", "%max_acc", "%reg_count", "%reg_names"),
/** Usage: /register >password> >ConfirmPassword> */
/** Usage: /register <password> <ConfirmPassword> */
USAGE_REGISTER("usage_reg"),
/** Usage: /unregister >password> */
/** Usage: /unregister <password> */
USAGE_UNREGISTER("usage_unreg"),
/** Password changed successfully! */
@ -122,7 +122,7 @@ public enum MessageKey {
/** Login timeout exceeded, you have been kicked from the server, please try again! */
LOGIN_TIMEOUT_ERROR("timeout"),
/** Usage: /changepassword >oldPassword> >newPassword> */
/** Usage: /changepassword <oldPassword> <newPassword> */
USAGE_CHANGE_PASSWORD("usage_changepassword"),
/** Your username is either too short or too long! */
@ -131,13 +131,13 @@ public enum MessageKey {
/** Your username contains illegal characters. Allowed chars: REG_EX */
INVALID_NAME_CHARACTERS("regex", "REG_EX"),
/** Please add your email to your account with the command "/email add >yourEmail> >confirmEmail>" */
/** Please add your email to your account with the command "/email add <yourEmail> <confirmEmail>" */
ADD_EMAIL_MESSAGE("add_email"),
/** Forgot your password? Please use the command "/email recovery >yourEmail>" */
/** Forgot your password? Please use the command "/email recovery <yourEmail>" */
FORGOT_PASSWORD_MESSAGE("recovery_email"),
/** To login you have to solve a captcha code, please use the command "/captcha >theCaptcha>" */
/** To login you have to solve a captcha code, please use the command "/captcha <theCaptcha>" */
USAGE_CAPTCHA("usage_captcha", "<theCaptcha>"),
/** Wrong captcha, please type "/captcha THE_CAPTCHA" into the chat! */
@ -152,13 +152,13 @@ public enum MessageKey {
/** The server is full, try again later! */
KICK_FULL_SERVER("kick_fullserver"),
/** Usage: /email add &gt;email> &gt;confirmEmail> */
/** Usage: /email add &lt;email> &lt;confirmEmail> */
USAGE_ADD_EMAIL("usage_email_add"),
/** Usage: /email change &gt;oldEmail> &gt;newEmail> */
/** Usage: /email change &lt;oldEmail> &lt;newEmail> */
USAGE_CHANGE_EMAIL("usage_email_change"),
/** Usage: /email recovery &gt;Email> */
/** Usage: /email recovery &lt;Email> */
USAGE_RECOVER_EMAIL("usage_email_recovery"),
/** Invalid new email, try again! */

View File

@ -11,7 +11,6 @@ import tools.utils.AutoToolTask;
import tools.utils.ToolsConstants;
import java.io.File;
import java.util.Scanner;
/**
* Generates the commands.yml file that corresponds to the default in the code.
@ -20,11 +19,6 @@ public class GenerateCommandsYml implements AutoToolTask {
private static final String COMMANDS_YML_FILE = ToolsConstants.MAIN_RESOURCES_ROOT + "commands.yml";
@Override
public void execute(Scanner scanner) {
executeDefault();
}
@Override
public void executeDefault() {
File file = new File(COMMANDS_YML_FILE);

View File

@ -45,6 +45,6 @@ public class AddJavaDocToMessageEnumTask implements AutoToolTask {
return configuration.getString(key.getKey())
.replaceAll("&[0-9a-f]", "")
.replace("&", "&amp;")
.replace("<", "&gt;");
.replace("<", "&lt;");
}
}