Merge branch 'master' of https://github.com/Xephi/AuthMeReloaded
This commit is contained in:
@@ -10,7 +10,6 @@ import fr.xephi.authme.AuthMe;
|
||||
import fr.xephi.authme.Utils;
|
||||
import fr.xephi.authme.cache.auth.PlayerAuth;
|
||||
import fr.xephi.authme.cache.auth.PlayerCache;
|
||||
import fr.xephi.authme.cache.backup.FileCache;
|
||||
import fr.xephi.authme.cache.limbo.LimboCache;
|
||||
import fr.xephi.authme.cache.limbo.LimboPlayer;
|
||||
import fr.xephi.authme.datasource.DataSource;
|
||||
@@ -25,7 +24,6 @@ public class AsyncronousQuit {
|
||||
protected Player p;
|
||||
protected Utils utils = Utils.getInstance();
|
||||
private String name;
|
||||
private FileCache playerBackup;
|
||||
private ItemStack[] armor = null;
|
||||
private ItemStack[] inv = null;
|
||||
private boolean isOp = false;
|
||||
@@ -39,7 +37,6 @@ public class AsyncronousQuit {
|
||||
this.plugin = plugin;
|
||||
this.database = database;
|
||||
this.name = p.getName().toLowerCase();
|
||||
this.playerBackup = new FileCache(plugin);
|
||||
this.isKick = isKick;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
package fr.xephi.authme.settings;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
|
||||
import fr.xephi.authme.AuthMe;
|
||||
import fr.xephi.authme.ConsoleLogger;
|
||||
|
||||
public class Messages extends CustomConfiguration {
|
||||
@@ -27,13 +24,11 @@ public class Messages extends CustomConfiguration {
|
||||
* @param filename
|
||||
* The filename to open
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public final void loadDefaults(File file) {
|
||||
InputStream stream = AuthMe.getInstance().getResource(file.getName());
|
||||
if (stream == null)
|
||||
if (!file.exists())
|
||||
return;
|
||||
|
||||
setDefaults(YamlConfiguration.loadConfiguration(stream));
|
||||
setDefaults(YamlConfiguration.loadConfiguration(file));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,7 +7,6 @@ import java.io.FileNotFoundException;
|
||||
import java.io.FileReader;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
@@ -102,7 +101,7 @@ public final class Settings extends YamlConfiguration {
|
||||
if (exists()) {
|
||||
load();
|
||||
} else {
|
||||
loadDefaults(file.getName());
|
||||
loadDefaults(file);
|
||||
load();
|
||||
}
|
||||
configFile = (YamlConfiguration) plugin.getConfig();
|
||||
@@ -672,7 +671,7 @@ public final class Settings extends YamlConfiguration {
|
||||
|
||||
public final void reload() {
|
||||
load();
|
||||
loadDefaults(file.getName());
|
||||
loadDefaults(file);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -704,13 +703,11 @@ public final class Settings extends YamlConfiguration {
|
||||
* @param filename
|
||||
* The filename to open
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public final void loadDefaults(String filename) {
|
||||
InputStream stream = plugin.getResource(filename);
|
||||
if (stream == null)
|
||||
public final void loadDefaults(File file) {
|
||||
if (!file.exists())
|
||||
return;
|
||||
|
||||
setDefaults(YamlConfiguration.loadConfiguration(stream));
|
||||
setDefaults(YamlConfiguration.loadConfiguration(file));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,12 +13,12 @@ user_regged: '&cBenutzername ist schon vergeben'
|
||||
usage_reg: '&cBenutze: /register <passwort> <passwortBestätigen>'
|
||||
max_reg: '&fDu hast die maximale Anzahl an Accounts erreicht'
|
||||
no_perm: '&cKeine Rechte'
|
||||
password_error_nick: '&fYou can''t use your name as password'
|
||||
password_error_unsafe: '&fYou can''t use unsafe passwords'
|
||||
password_error_nick: '&fDu kannst nicht deinen Namen als Passwort nutzen!'
|
||||
password_error_unsafe: '&fDu kannst nicht unsichere Passwörter nutzen!'
|
||||
error: '&fEin Fehler ist aufgetreten. Bitte kontaktiere einen Admin'
|
||||
login_msg: '&cBitte logge dich ein mit "/login <passwort>"'
|
||||
reg_msg: '&cBitte registriere dich mit "/register <passwort> <passwortBestätigen>"'
|
||||
reg_email_msg: '&cPlease register with "/register <email> <confirmEmail>"'
|
||||
reg_email_msg: '&cBitte registriere dich mit "/register <email> <emailBestätigen>"'
|
||||
usage_unreg: '&cBenutze: /unregister <passwort>'
|
||||
pwd_changed: '&cPasswort geändert!'
|
||||
user_unknown: '&cBenutzername nicht registriert'
|
||||
@@ -29,30 +29,30 @@ logged_in: '&cBereits eingeloggt!'
|
||||
logout: '&cErfolgreich ausgeloggt'
|
||||
same_nick: '&fSelber Name spielt bereits'
|
||||
registered: '&cErfolgreich registriert!'
|
||||
pass_len: '&fDein Passwort ist zu kurz oder zu langg'
|
||||
pass_len: '&fDein Passwort ist zu kurz oder zu lang'
|
||||
reload: '&fKonfiguration und Datenbank neu geladen'
|
||||
timeout: '&fZeitüberschreitung beim Login'
|
||||
usage_changepassword: '&fBenutze: /changepassword <altesPasswort> <neuesPasswort>'
|
||||
name_len: '&cDein Nickname ist zu kurz oder zu lang'
|
||||
regex: '&cDein Nichname enthält nicht erlaubte Zeichen. Zulässige Zeichen: REG_EX'
|
||||
add_email: '&cBitte hinterlege Deine E-Mail Adresse: /email add <deineEmail> <emailBestätigen>'
|
||||
bad_database_email: '[AuthMe] Der /email Befehl ist nur mit MySQL und SQLite kompatibel. Bitte kontaktieren einen Admin'
|
||||
recovery_email: '&cPasswort vergessen? Nutze "/email recovery <yourEmail>" für ein neues Passwort'
|
||||
usage_captcha: '&cBenutze: /captcha <dasCaptcha>'
|
||||
bad_database_email: '[AuthMe] Der /email Befehl ist nur mit MySQL und SQLite kompatibel. Bitte kontaktiere einen Administrator!'
|
||||
recovery_email: '&cPasswort vergessen? Nutze "/email recovery <deineEmail>" für ein neues Passwort'
|
||||
usage_captcha: '&cBenutze: /captcha <theCaptcha>'
|
||||
wrong_captcha: '&cFalsches Captcha, bitte nutze: /captcha <dasCaptcha>'
|
||||
valid_captcha: '&cDas Captcha ist korrekt!'
|
||||
kick_forvip: '&cEin VIP Spieler hat den vollen Server betreten!'
|
||||
kick_fullserver: '&cDer Server ist momentan voll, Sorry!'
|
||||
usage_email_add: '&fUsage: /email add <email> <confirmEmail> '
|
||||
usage_email_change: '&fUsage: /email change <oldEmail> <newEmail> '
|
||||
usage_email_recovery: '&fUsage: /email recovery <Email>'
|
||||
new_email_invalid: '[AuthMe] New email invalid!'
|
||||
old_email_invalid: '[AuthMe] Old email invalid!'
|
||||
email_invalid: '[AuthMe] Invalid Email'
|
||||
email_added: '[AuthMe] Email Added !'
|
||||
email_confirm: '[AuthMe] Confirm your Email !'
|
||||
email_changed: '[AuthMe] Email Change !'
|
||||
email_send: '[AuthMe] Recovery Email Send !'
|
||||
country_banned: 'Your country is banned from this server'
|
||||
antibot_auto_enabled: '[AuthMe] AntiBotMod automatically enabled due to massive connections!'
|
||||
antibot_auto_disabled: '[AuthMe] AntiBotMod automatically disabled after %m Minutes, hope invasion stopped'
|
||||
usage_email_add: '&fBenutzung: /email add <email> <bestätigeEmail> '
|
||||
usage_email_change: '&fBenutzung: /email change <alteEmail> <neueEmail> '
|
||||
usage_email_recovery: '&fBenutzung: /email recovery <Email>'
|
||||
new_email_invalid: '[AuthMe] Die neue Email ist ungültig!'
|
||||
old_email_invalid: '[AuthMe] Die alte Email ist ungültig!'
|
||||
email_invalid: '[AuthMe] Ungültige Email'
|
||||
email_added: '[AuthMe] Email hinzugefügt!'
|
||||
email_confirm: '[AuthMe] Bitte bestätige deine Email!'
|
||||
email_changed: '[AuthMe] Email aktualisiert!'
|
||||
email_send: '[AuthMe] Wiederherstellungs-Email wurde gesendet !'
|
||||
country_banned: 'Dein Land ist gesperrt'
|
||||
antibot_auto_enabled: '[AuthMe] AntiBotMod wurde aufgrund hoher Netzauslastung automatisch aktiviert!'
|
||||
antibot_auto_disabled: '[AuthMe] AntiBotMod wurde nach %m Minuten deaktiviert, hoffentlich ist die Invasion vorbei'
|
||||
|
||||
@@ -1,59 +1,59 @@
|
||||
unknown_user: '&fThe requested user is not in the database'
|
||||
unsafe_spawn: '&fYour quit location was unsafe, teleporting you to world spawn'
|
||||
unknown_user: '&cCan''t find the requested user in the database!'
|
||||
unsafe_spawn: '&cYour quit location was unsafe, you have been teleported to the world''s spawnpoint.'
|
||||
not_logged_in: '&cYou''re not logged in!'
|
||||
reg_voluntarily: '&fYou can register your nickname with the command "/register <password> <ConfirmPassword>"'
|
||||
reg_voluntarily: 'You can register yourself to the server with the command "/register <password> <ConfirmPassword>"'
|
||||
usage_log: '&cUsage: /login <password>'
|
||||
wrong_pwd: '&cWrong password'
|
||||
wrong_pwd: '&cWrong password!'
|
||||
unregistered: '&cSuccessfully unregistered!'
|
||||
reg_disabled: '&cRegistration is disabled'
|
||||
valid_session: '&cSession login'
|
||||
login: '&cSuccessful login!'
|
||||
vb_nonActiv: '&fYour account isn''t activated yet, check your emails!'
|
||||
user_regged: '&cYou have already registered this username'
|
||||
reg_disabled: '&cIn-game registration is disabled!'
|
||||
valid_session: '&2Logged-in due to Session Reconnection.'
|
||||
login: '&2Successful login!'
|
||||
vb_nonActiv: '&cYour account isn''t activated yet, please check your emails!'
|
||||
user_regged: '&cYou already have registered this username!'
|
||||
usage_reg: '&cUsage: /register <password> <ConfirmPassword>'
|
||||
max_reg: '&fYou have exceeded the max number of registrations for your account'
|
||||
no_perm: '&cYou don''t have the permission to execute this command'
|
||||
error: '&fAn error occurred; Please contact the admin'
|
||||
login_msg: '&cPlease login with "/login <password>"'
|
||||
reg_msg: '&cPlease register with "/register <password> <ConfirmPassword>"'
|
||||
reg_email_msg: '&cPlease register with "/register <email> <confirmEmail>"'
|
||||
max_reg: '&cYou have exceeded the maximum number of registrations for your connection!'
|
||||
no_perm: '&4You don''t have the permission to perform this action!'
|
||||
error: '&4An unexpected error occurred, please contact an Administrator!'
|
||||
login_msg: '&cPlease, login with the command "/login <password>"'
|
||||
reg_msg: '&3Please, register to the server with the command "/register <password> <ConfirmPassword>"'
|
||||
reg_email_msg: '&3Please, register to the server with the command "/register <email> <confirmEmail>"'
|
||||
usage_unreg: '&cUsage: /unregister <password>'
|
||||
pwd_changed: '&cPassword changed!'
|
||||
user_unknown: '&cUsername not registered'
|
||||
password_error: '&fPassword doesn''t match'
|
||||
password_error_nick: '&fYou can''t use your name as password, please choose another one'
|
||||
password_error_unsafe: '&fThe chosen password is not safe, please choose another one'
|
||||
invalid_session: '&fSession datas doesn''t match. Please wait until the end of the current session'
|
||||
reg_only: '&fRegistered players only! Please visit http://example.com to register'
|
||||
pwd_changed: '&2Password changed successfully!'
|
||||
user_unknown: '&cThis user isn''t registered!'
|
||||
password_error: '&cPasswords didn''t match, check them again!'
|
||||
password_error_nick: '&cYou can''t use your name as password, please choose another one...'
|
||||
password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...'
|
||||
invalid_session: '&cYour IP has been changed and your session data has expired!'
|
||||
reg_only: '&4Only registered users can join the server! Please visit http://example.com to register yourself!'
|
||||
logged_in: '&cYou''re already logged in!'
|
||||
logout: '&cSuccessfully logged out'
|
||||
same_nick: '&fThe same nick is already playing on the server'
|
||||
registered: '&cSuccessfully registered!'
|
||||
pass_len: '&fYour password didn''t reach the minimum length or exceeded the max length'
|
||||
reload: '&fConfiguration and database has been reloaded'
|
||||
timeout: '&fLogin timeout, please try again'
|
||||
usage_changepassword: '&fUsage: /changepassword <oldPassword> <newPassword>'
|
||||
name_len: '&cYour nickname is either too short or too long'
|
||||
regex: '&cYour nickname contains illegal characters. Allowed chars: REG_EX'
|
||||
add_email: '&cPlease add your email with: /email add <yourEmail> <confirmEmail>'
|
||||
bad_database_email: '[AuthMe] This /email command is only available with MySQL and SQLite, contact an admin'
|
||||
recovery_email: '&cForgot your password? Please use /email recovery <yourEmail>'
|
||||
usage_captcha: '&cWe need you to type a captcha, please type: /captcha <theCaptcha>'
|
||||
wrong_captcha: '&cWrong Captcha, please type: /captcha THE_CAPTCHA'
|
||||
valid_captcha: '&cYour captcha is valid!'
|
||||
kick_forvip: '&cA VIP Player has joined the server when full!'
|
||||
kick_fullserver: '&cThe server is full, try again later'
|
||||
usage_email_add: '&fUsage: /email add <email> <confirmEmail>'
|
||||
usage_email_change: '&fUsage: /email change <oldEmail> <newEmail>'
|
||||
usage_email_recovery: '&fUsage: /email recovery <Email>'
|
||||
new_email_invalid: '[AuthMe] New email invalid!'
|
||||
old_email_invalid: '[AuthMe] Old email invalid!'
|
||||
email_invalid: '[AuthMe] Invalid email'
|
||||
email_added: '[AuthMe] Email Added!'
|
||||
email_confirm: '[AuthMe] Confirm your email!'
|
||||
email_changed: '[AuthMe] Email changed!'
|
||||
email_send: '[AuthMe] Recovery email sent!'
|
||||
email_exists: '[AuthMe] An email already exists on your account. You can change it using the command below'
|
||||
country_banned: 'Your country is banned from this server'
|
||||
antibot_auto_enabled: '[AuthMe] AntiBotMod automatically enabled due to the number of connections!'
|
||||
antibot_auto_disabled: '[AuthMe] AntiBotMod automatically disabled after %m minutes'
|
||||
logout: '&2Logged-out successfully!'
|
||||
same_nick: '&4The same username is already playing on the server!'
|
||||
registered: '&2Successfully registered!'
|
||||
pass_len: '&cYour password is too short or too long! Please try with another one!'
|
||||
reload: '&2Configuration and database have been reloaded correctly!'
|
||||
timeout: '&4Login timeout exceeded, you have been kicked from the server, please try again!'
|
||||
usage_changepassword: '&cUsage: /changepassword <oldPassword> <newPassword>'
|
||||
name_len: '&4Your username is either too short or too long!'
|
||||
regex: '&4Your username contains illegal characters. Allowed chars: REG_EX'
|
||||
add_email: '&3Please add your email to your account with the command "/email add <yourEmail> <confirmEmail>"'
|
||||
bad_database_email: '&4The /email command is available only with MySQL and SQLite databases, please contact an Admin!' #This should be removed!
|
||||
recovery_email: '&3Forgot your password? Please use the command "/email recovery <yourEmail>"'
|
||||
usage_captcha: '&3To login you have to solve a captcha code, please use the command "/captcha <theCaptcha>"'
|
||||
wrong_captcha: '&cWrong Captcha, please type "/captcha THE_CAPTCHA" into the chat!'
|
||||
valid_captcha: '&2Captcha code solved correctly!'
|
||||
kick_forvip: '&3A VIP Player has joined the server when it was full!'
|
||||
kick_fullserver: '&4The server is full, try again later!'
|
||||
usage_email_add: '&cUsage: /email add <email> <confirmEmail>'
|
||||
usage_email_change: '&cUsage: /email change <oldEmail> <newEmail>'
|
||||
usage_email_recovery: '&cUsage: /email recovery <Email>'
|
||||
new_email_invalid: '&cInvalid New Email, try again!'
|
||||
old_email_invalid: '&cInvalid Old Email, try again!'
|
||||
email_invalid: '&cInvalid Email address, try again!'
|
||||
email_added: '&2Email address successfully added to your account!'
|
||||
email_confirm: '&cPlease confirm your email address!'
|
||||
email_changed: '&2Email address changed correctly!'
|
||||
email_send: '&2Recovery email sent correctly! Check your email inbox!'
|
||||
email_exists: '&cA recovery email was already sent! You can discart it and send a new one using the command below:'
|
||||
country_banned: '&4Your country is banned from this server!'
|
||||
antibot_auto_enabled: '&4[AntiBotService] AntiBot enabled due to the huge number of connections!'
|
||||
antibot_auto_disabled: '&2[AntiBotService] AntiBot disabled disabled after %m minutes!'
|
||||
|
||||
Reference in New Issue
Block a user