#525 Make "not owner" kick reason translatable

This commit is contained in:
ljacqu 2016-02-14 21:46:47 +01:00
parent 7f3246e416
commit f5b5595f08
28 changed files with 52 additions and 25 deletions

View File

@ -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;

View File

@ -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);
}

View File

@ -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'
# 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!'

View File

@ -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'
# 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!'

View File

@ -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'
# 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!'

View File

@ -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'
# 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!'

View File

@ -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!'

View File

@ -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'
# 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!'

View File

@ -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 <theCaptcha>"'
# 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 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!'

View File

@ -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'
# 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!'

View File

@ -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'
# 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!'

View File

@ -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'
# 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!'

View File

@ -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!'

View File

@ -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 <password>'
# 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 <password> <ConfirmPassword>'

View File

@ -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'
# 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!'

View File

@ -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'
# 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!'

View File

@ -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 <email> <confirmEmail>'
# 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 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!'

View File

@ -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 <email> <confirmEmail>"'
# TODO reg_email_msg: '&3Please, register to the server with the command "/register <email> <confirmEmail>"'
# TODO not_owner_error: 'You are not the owner of this account. Please try another name!'

View File

@ -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'
# 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!'

View File

@ -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'
# 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!'

View File

@ -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'
# 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!'

View File

@ -61,4 +61,5 @@ recovery_email: '&cZabudol si heslo? Pouzi príkaz /email recovery <tvojEmail>'
# TODO usage_email_add: '&cUsage: /email add <email> <confirmEmail>'
# 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 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!'

View File

@ -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'
# 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!'

View File

@ -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'
# 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!'

View File

@ -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'
# 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!'

View File

@ -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'
# 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!'

View File

@ -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!'

View File

@ -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'
# 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!'