-
Notifications
You must be signed in to change notification settings - Fork 557
Expand file tree
/
Copy pathMessageKey.java
More file actions
373 lines (258 loc) · 13.5 KB
/
MessageKey.java
File metadata and controls
373 lines (258 loc) · 13.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
package fr.xephi.authme.message;
/**
* Keys for translatable messages managed by {@link Messages}.
*/
public enum MessageKey {
/** In order to use this command you must be authenticated! */
DENIED_COMMAND("error.denied_command"),
/** A player with the same IP is already in game! */
SAME_IP_ONLINE("on_join_validation.same_ip_online"),
/** In order to chat you must be authenticated! */
DENIED_CHAT("error.denied_chat"),
/** AntiBot protection mode is enabled! You have to wait some minutes before joining the server. */
KICK_ANTIBOT("antibot.kick_antibot"),
/** This user isn't registered! */
UNKNOWN_USER("error.unregistered_user"),
/** You're not logged in! */
NOT_LOGGED_IN("error.not_logged_in"),
/** Usage: /login <password> */
USAGE_LOGIN("login.command_usage"),
/** Wrong password! */
WRONG_PASSWORD("login.wrong_password"),
/** Successfully unregistered! */
UNREGISTERED_SUCCESS("unregister.success"),
/** In-game registration is disabled! */
REGISTRATION_DISABLED("registration.disabled"),
/** Logged-in due to Session Reconnection. */
SESSION_RECONNECTION("session.valid_session"),
/** Successful login! */
LOGIN_SUCCESS("login.success"),
/** Your account isn't activated yet, please check your emails! */
ACCOUNT_NOT_ACTIVATED("misc.account_not_activated"),
/** You already have registered this username! */
NAME_ALREADY_REGISTERED("registration.name_taken"),
/** You don't have the permission to perform this action! */
NO_PERMISSION("error.no_permission"),
/** An unexpected error occurred, please contact an administrator! */
ERROR("error.unexpected_error"),
/** Please, login with the command: /login <password> */
LOGIN_MESSAGE("login.login_request"),
/** Please, register to the server with the command: /register <password> <ConfirmPassword> */
REGISTER_MESSAGE("registration.register_request"),
/** You have exceeded the maximum number of registrations (%reg_count/%max_acc %reg_names) for your connection! */
MAX_REGISTER_EXCEEDED("error.max_registration", "%max_acc", "%reg_count", "%reg_names"),
/** Usage: /register <password> <ConfirmPassword> */
USAGE_REGISTER("registration.command_usage"),
/** Usage: /unregister <password> */
USAGE_UNREGISTER("unregister.command_usage"),
/** Password changed successfully! */
PASSWORD_CHANGED_SUCCESS("misc.password_changed"),
/** Passwords didn't match, check them again! */
PASSWORD_MATCH_ERROR("password.match_error"),
/** You can't use your name as password, please choose another one... */
PASSWORD_IS_USERNAME_ERROR("password.name_in_password"),
/** The chosen password isn't safe, please choose another one... */
PASSWORD_UNSAFE_ERROR("password.unsafe_password"),
/**
* Your chosen password is not secure.
* It has been seen %pwned_count times before!
* Please use a stronger password...
*/
PASSWORD_PWNED_ERROR("password.pwned_password", "%pwned_count"),
/** Your password contains illegal characters. Allowed chars: %valid_chars */
PASSWORD_CHARACTERS_ERROR("password.forbidden_characters", "%valid_chars"),
/** Your IP has been changed and your session data has expired! */
SESSION_EXPIRED("session.invalid_session"),
/** Only registered users can join the server! Please visit http://example.com to register yourself! */
MUST_REGISTER_MESSAGE("registration.reg_only"),
/** You're already logged in! */
ALREADY_LOGGED_IN_ERROR("error.logged_in"),
/** Logged out successfully! */
LOGOUT_SUCCESS("misc.logout"),
/** The same username is already playing on the server! */
USERNAME_ALREADY_ONLINE_ERROR("on_join_validation.same_nick_online"),
/** Successfully registered! */
REGISTER_SUCCESS("registration.success"),
/** Your password is too short or too long! Please try with another one! */
INVALID_PASSWORD_LENGTH("password.wrong_length"),
/** Configuration and database have been reloaded correctly! */
CONFIG_RELOAD_SUCCESS("misc.reload"),
/** Login timeout exceeded, you have been kicked from the server, please try again! */
LOGIN_TIMEOUT_ERROR("login.timeout_error"),
/** Usage: /changepassword <oldPassword> <newPassword> */
USAGE_CHANGE_PASSWORD("misc.usage_change_password"),
/** Your username is either too short or too long! */
INVALID_NAME_LENGTH("on_join_validation.name_length"),
/** Your username contains illegal characters. Allowed chars: %valid_chars */
INVALID_NAME_CHARACTERS("on_join_validation.characters_in_name", "%valid_chars"),
/** Please add your email to your account with the command: /email add <yourEmail> <confirmEmail> */
ADD_EMAIL_MESSAGE("email.add_email_request"),
/** Forgot your password? Please use the command: /email recovery <yourEmail> */
FORGOT_PASSWORD_MESSAGE("recovery.forgot_password_hint"),
/** To log in you have to solve a captcha code, please use the command: /captcha %captcha_code */
USAGE_CAPTCHA("captcha.usage_captcha", "%captcha_code"),
/** Wrong captcha, please type "/captcha %captcha_code" into the chat! */
CAPTCHA_WRONG_ERROR("captcha.wrong_captcha", "%captcha_code"),
/** Captcha code solved correctly! */
CAPTCHA_SUCCESS("captcha.valid_captcha"),
/** To register you have to solve a captcha first, please use the command: /captcha %captcha_code */
CAPTCHA_FOR_REGISTRATION_REQUIRED("captcha.captcha_for_registration", "%captcha_code"),
/** Valid captcha! You may now register with /register */
REGISTER_CAPTCHA_SUCCESS("captcha.register_captcha_valid"),
/** A VIP player has joined the server when it was full! */
KICK_FOR_VIP("error.kick_for_vip"),
/** The server is full, try again later! */
KICK_FULL_SERVER("on_join_validation.kick_full_server"),
/** An error occurred: unresolved player hostname! **/
KICK_UNRESOLVED_HOSTNAME("error.kick_unresolved_hostname"),
/** Usage: /email add <email> <confirmEmail> */
USAGE_ADD_EMAIL("email.usage_email_add"),
/** Usage: /email change <oldEmail> <newEmail> */
USAGE_CHANGE_EMAIL("email.usage_email_change"),
/** Usage: /email recovery <Email> */
USAGE_RECOVER_EMAIL("recovery.command_usage"),
/** Invalid new email, try again! */
INVALID_NEW_EMAIL("email.new_email_invalid"),
/** Invalid old email, try again! */
INVALID_OLD_EMAIL("email.old_email_invalid"),
/** Invalid email address, try again! */
INVALID_EMAIL("email.invalid"),
/** Email address successfully added to your account! */
EMAIL_ADDED_SUCCESS("email.added"),
/** Adding email was not allowed */
EMAIL_ADD_NOT_ALLOWED("email.add_not_allowed"),
/** Please confirm your email address! */
CONFIRM_EMAIL_MESSAGE("email.request_confirmation"),
/** Email address changed correctly! */
EMAIL_CHANGED_SUCCESS("email.changed"),
/** Changing email was not allowed */
EMAIL_CHANGE_NOT_ALLOWED("email.change_not_allowed"),
/** Your current email address is: %email */
EMAIL_SHOW("email.email_show", "%email"),
/** You currently don't have email address associated with this account. */
SHOW_NO_EMAIL("email.no_email_for_account"),
/** Recovery email sent successfully! Please check your email inbox! */
RECOVERY_EMAIL_SENT_MESSAGE("recovery.email_sent"),
/** Your country is banned from this server! */
COUNTRY_BANNED_ERROR("on_join_validation.country_banned"),
/** [AntiBotService] AntiBot enabled due to the huge number of connections! */
ANTIBOT_AUTO_ENABLED_MESSAGE("antibot.auto_enabled"),
/** [AntiBotService] AntiBot disabled after %m minutes! */
ANTIBOT_AUTO_DISABLED_MESSAGE("antibot.auto_disabled", "%m"),
/** The email address is already being used */
EMAIL_ALREADY_USED_ERROR("email.already_used"),
/** Your secret code is %code. You can scan it from here %url */
TWO_FACTOR_CREATE("two_factor.code_created", "%code", "%url"),
/** Please confirm your code with /2fa confirm <code> */
TWO_FACTOR_CREATE_CONFIRMATION_REQUIRED("two_factor.confirmation_required"),
/** Please submit your two-factor authentication code with /2fa code <code> */
TWO_FACTOR_CODE_REQUIRED("two_factor.code_required"),
/** Two-factor authentication is already enabled for your account! */
TWO_FACTOR_ALREADY_ENABLED("two_factor.already_enabled"),
/** No 2fa key has been generated for you or it has expired. Please run /2fa add */
TWO_FACTOR_ENABLE_ERROR_NO_CODE("two_factor.enable_error_no_code"),
/** Successfully enabled two-factor authentication for your account */
TWO_FACTOR_ENABLE_SUCCESS("two_factor.enable_success"),
/** Wrong code or code has expired. Please run /2fa add */
TWO_FACTOR_ENABLE_ERROR_WRONG_CODE("two_factor.enable_error_wrong_code"),
/** Two-factor authentication is not enabled for your account. Run /2fa add */
TWO_FACTOR_NOT_ENABLED_ERROR("two_factor.not_enabled_error"),
/** Successfully removed two-factor auth from your account */
TWO_FACTOR_REMOVED_SUCCESS("two_factor.removed_success"),
/** Invalid code! */
TWO_FACTOR_INVALID_CODE("two_factor.invalid_code"),
/** You are not the owner of this account. Please choose another name! */
NOT_OWNER_ERROR("on_join_validation.not_owner_error"),
/** You should join using username %valid, not %invalid. */
INVALID_NAME_CASE("on_join_validation.invalid_name_case", "%valid", "%invalid"),
/** You have been temporarily banned for failing to log in too many times. */
TEMPBAN_MAX_LOGINS("error.tempban_max_logins"),
/** You own %count accounts: */
ACCOUNTS_OWNED_SELF("misc.accounts_owned_self", "%count"),
/** The player %name has %count accounts: */
ACCOUNTS_OWNED_OTHER("misc.accounts_owned_other", "%name", "%count"),
/** An admin just registered you; please log in again */
KICK_FOR_ADMIN_REGISTER("registration.kicked_admin_registered"),
/** Error: not all required settings are set for sending emails. Please contact an admin. */
INCOMPLETE_EMAIL_SETTINGS("email.incomplete_settings"),
/** The email could not be sent. Please contact an administrator. */
EMAIL_SEND_FAILURE("email.send_failure"),
/** A recovery code to reset your password has been sent to your email. */
RECOVERY_CODE_SENT("recovery.code.code_sent"),
/** The recovery code is not correct! You have %count tries remaining. */
INCORRECT_RECOVERY_CODE("recovery.code.incorrect", "%count"),
/**
* You have exceeded the maximum number of attempts to enter the recovery code.
* Use "/email recovery [email]" to generate a new one.
*/
RECOVERY_TRIES_EXCEEDED("recovery.code.tries_exceeded"),
/** Recovery code entered correctly! */
RECOVERY_CODE_CORRECT("recovery.code.correct"),
/** Please use the command /email setpassword to change your password immediately. */
RECOVERY_CHANGE_PASSWORD("recovery.code.change_password"),
/** You cannot change your password using this command anymore. */
CHANGE_PASSWORD_EXPIRED("email.change_password_expired"),
/** An email was already sent recently. You must wait %time before you can send a new one. */
EMAIL_COOLDOWN_ERROR("email.email_cooldown_error", "%time"),
/**
* This command is sensitive and requires an email verification!
* Check your inbox and follow the email's instructions.
*/
VERIFICATION_CODE_REQUIRED("verification.code_required"),
/** Usage: /verification <code> */
USAGE_VERIFICATION_CODE("verification.command_usage"),
/** Incorrect code, please type "/verification <code>" into the chat, using the code you received by email */
INCORRECT_VERIFICATION_CODE("verification.incorrect_code"),
/** Your identity has been verified! You can now execute all commands within the current session! */
VERIFICATION_CODE_VERIFIED("verification.success"),
/** You can already execute every sensitive command within the current session! */
VERIFICATION_CODE_ALREADY_VERIFIED("verification.already_verified"),
/** Your code has expired! Execute another sensitive command to get a new code! */
VERIFICATION_CODE_EXPIRED("verification.code_expired"),
/** To verify your identity you need to link an email address with your account! */
VERIFICATION_CODE_EMAIL_NEEDED("verification.email_needed"),
/** You used a command too fast! Please, join the server again and wait more before using any command. */
QUICK_COMMAND_PROTECTION_KICK("on_join_validation.quick_command"),
/** second */
SECOND("time.second"),
/** seconds */
SECONDS("time.seconds"),
/** minute */
MINUTE("time.minute"),
/** minutes */
MINUTES("time.minutes"),
/** hour */
HOUR("time.hour"),
/** hours */
HOURS("time.hours"),
/** day */
DAY("time.day"),
/** days */
DAYS("time.days");
private String key;
private String[] tags;
MessageKey(String key, String... tags) {
this.key = key;
this.tags = tags;
}
/**
* Return the key used in the messages file.
*
* @return The key
*/
public String getKey() {
return key;
}
/**
* Return a list of tags (texts) that are replaced with actual content in AuthMe.
*
* @return List of tags
*/
public String[] getTags() {
return tags;
}
@Override
public String toString() {
return key;
}
}