mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-26 04:05:28 +01:00
Dev - 3.1.2-DEV-3
Developpement status actually Some Fixes for the 1.7.2 Remove some Magic Values Fix threads not start correctly Add a recall email adding message Fix catpcha messages Add multilines messages ( add &n ) Fix some inventory problem Fix some events problem Call login event after /register
This commit is contained in:
parent
aaeceae5d2
commit
93a320c8ae
4
pom.xml
4
pom.xml
@ -24,12 +24,12 @@
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<version>3.1.2-DEV-1</version>
|
||||
<version>3.1.2-DEV-3</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
<version>1.7.2-R0.1-SNAPSHOT</version>
|
||||
<version>1.7.2-R0.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.milkbowl.vault</groupId>
|
||||
|
@ -145,7 +145,6 @@ public class AuthMe extends JavaPlugin {
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
//Load MailApi
|
||||
if(!Settings.getmailAccount.isEmpty() && !Settings.getmailPassword.isEmpty())
|
||||
mail = new SendMailSSL(this);
|
||||
@ -184,7 +183,7 @@ public class AuthMe extends JavaPlugin {
|
||||
case FILE:
|
||||
if (Settings.useMultiThreading) {
|
||||
FlatFileThread fileThread = new FlatFileThread();
|
||||
fileThread.run();
|
||||
fileThread.start();
|
||||
database = fileThread;
|
||||
databaseThread = fileThread;
|
||||
break;
|
||||
@ -205,7 +204,7 @@ public class AuthMe extends JavaPlugin {
|
||||
case MYSQL:
|
||||
if (Settings.useMultiThreading) {
|
||||
MySQLThread sqlThread = new MySQLThread();
|
||||
sqlThread.run();
|
||||
sqlThread.start();
|
||||
database = sqlThread;
|
||||
databaseThread = sqlThread;
|
||||
break;
|
||||
@ -226,7 +225,7 @@ public class AuthMe extends JavaPlugin {
|
||||
case SQLITE:
|
||||
if (Settings.useMultiThreading) {
|
||||
SQLiteThread sqliteThread = new SQLiteThread();
|
||||
sqliteThread.run();
|
||||
sqliteThread.start();
|
||||
database = sqliteThread;
|
||||
databaseThread = sqliteThread;
|
||||
break;
|
||||
@ -255,6 +254,7 @@ public class AuthMe extends JavaPlugin {
|
||||
|
||||
// Setup Management
|
||||
management = new Management(database, this);
|
||||
management.start();
|
||||
|
||||
PluginManager pm = getServer().getPluginManager();
|
||||
if (Settings.bungee) {
|
||||
@ -325,6 +325,10 @@ public class AuthMe extends JavaPlugin {
|
||||
enableProtection();
|
||||
if (Settings.usePurge)
|
||||
autoPurge();
|
||||
|
||||
// Start Email recall task if needed
|
||||
recallEmail();
|
||||
|
||||
ConsoleLogger.info("Authme " + this.getDescription().getVersion() + " enabled");
|
||||
}
|
||||
|
||||
@ -354,9 +358,7 @@ public class AuthMe extends JavaPlugin {
|
||||
} catch (NumberFormatException nfee) {
|
||||
}
|
||||
}
|
||||
} catch (NullPointerException npe) {}
|
||||
catch (NoClassDefFoundError ncdfe) {}
|
||||
catch (ClassCastException cce) {}
|
||||
} catch (Exception e) {}
|
||||
}
|
||||
}
|
||||
|
||||
@ -739,4 +741,25 @@ public class AuthMe extends JavaPlugin {
|
||||
Settings.switchAntiBotMod(mode);
|
||||
}
|
||||
|
||||
private void recallEmail() {
|
||||
if (!Settings.recallEmail)
|
||||
return;
|
||||
Bukkit.getScheduler().scheduleSyncRepeatingTask(this, new Runnable(){
|
||||
@Override
|
||||
public void run() {
|
||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||
if (player.isOnline()) {
|
||||
String name = player.getName().toLowerCase();
|
||||
if (database.isAuthAvailable(name))
|
||||
if (PlayerCache.getInstance().isAuthenticated(name)) {
|
||||
String email = database.getAuth(name).getEmail();
|
||||
if (email == null || email.isEmpty() || email.equalsIgnoreCase("your@email.com"))
|
||||
m._(player, "add_email");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 1, 1200 * Settings.delayRecall);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ import fr.xephi.authme.settings.Settings;
|
||||
* @authors Xephi59, <a href="http://dev.bukkit.org/profiles/Possible/">Possible</a>
|
||||
*
|
||||
*/
|
||||
public class Management {
|
||||
public class Management extends Thread {
|
||||
private Messages m = Messages.getInstance();
|
||||
private PlayersLogs pllog = PlayersLogs.getInstance();
|
||||
private Utils utils = Utils.getInstance();
|
||||
@ -49,6 +49,9 @@ public class Management {
|
||||
this.plugin = plugin;
|
||||
this.pm = plugin.getServer().getPluginManager();
|
||||
}
|
||||
|
||||
public void run() {
|
||||
}
|
||||
|
||||
public void performLogin(final Player player, final String password, final boolean passpartu, final boolean forceLogin) {
|
||||
if (passpartu) {
|
||||
@ -111,20 +114,20 @@ public class Management {
|
||||
*/
|
||||
protected PlayerAuth preAuth() {
|
||||
if (PlayerCache.getInstance().isAuthenticated(name)) {
|
||||
player.sendMessage(m._("logged_in"));
|
||||
m._(player, "logged_in");
|
||||
return null;
|
||||
}
|
||||
if (!database.isAuthAvailable(name)) {
|
||||
player.sendMessage(m._("user_unknown"));
|
||||
m._(player, "user_unknown");
|
||||
return null;
|
||||
}
|
||||
PlayerAuth pAuth = database.getAuth(name);
|
||||
if (pAuth == null) {
|
||||
player.sendMessage(m._("user_unknown"));
|
||||
m._(player, "user_unknown");
|
||||
return null;
|
||||
}
|
||||
if (!Settings.getMySQLColumnGroup.isEmpty() && pAuth.getGroupId() == Settings.getNonActivatedGroup) {
|
||||
player.sendMessage(m._("vb_nonActiv"));
|
||||
m._(player, "vb_nonActiv");
|
||||
return null;
|
||||
}
|
||||
return pAuth;
|
||||
@ -143,7 +146,7 @@ public class Management {
|
||||
passwordVerified = PasswordSecurity.comparePasswordWithHash(password, hash, name);
|
||||
} catch (Exception ex) {
|
||||
ConsoleLogger.showError(ex.getMessage());
|
||||
player.sendMessage(m._("error"));
|
||||
m._(player, "error");
|
||||
return;
|
||||
}
|
||||
if (passwordVerified && player.isOnline()) {
|
||||
@ -174,7 +177,7 @@ public class Management {
|
||||
}
|
||||
|
||||
player.setNoDamageTicks(0);
|
||||
player.sendMessage(m._("login"));
|
||||
m._(player, "login");
|
||||
|
||||
displayOtherAccounts(auth);
|
||||
|
||||
@ -204,13 +207,13 @@ public class Management {
|
||||
@Override
|
||||
public void run() {
|
||||
if (AuthMePlayerListener.gameMode != null && AuthMePlayerListener.gameMode.containsKey(name)) {
|
||||
player.setGameMode(GameMode.getByValue(AuthMePlayerListener.gameMode.get(name)));
|
||||
player.setGameMode(AuthMePlayerListener.gameMode.get(name));
|
||||
}
|
||||
player.kickPlayer(m._("wrong_pwd"));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
player.sendMessage(m._("wrong_pwd"));
|
||||
m._(player, "wrong_pwd");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
@ -259,7 +262,7 @@ public class Management {
|
||||
}
|
||||
|
||||
player.setNoDamageTicks(0);
|
||||
player.sendMessage(m._("login"));
|
||||
m._(player, "login");
|
||||
|
||||
displayOtherAccounts(auth);
|
||||
|
||||
@ -362,7 +365,7 @@ public class Management {
|
||||
* Also it's the current world inventory !
|
||||
*/
|
||||
if (!Settings.forceOnlyAfterLogin) {
|
||||
player.setGameMode(GameMode.getByValue(limbo.getGameMode()));
|
||||
player.setGameMode(limbo.getGameMode());
|
||||
// Inventory - Make it after restore GameMode , cause we need to restore the
|
||||
// right inventory in the right gamemode
|
||||
if (Settings.protectInventoryBeforeLogInEnabled && player.hasPlayedBefore()) {
|
||||
@ -410,6 +413,7 @@ public class Management {
|
||||
if (p.isOnline())
|
||||
p.sendMessage(AuthMePlayerListener.joinMessage.get(name));
|
||||
}
|
||||
AuthMePlayerListener.joinMessage.remove(name);
|
||||
}
|
||||
|
||||
// The Loginevent now fires (as intended) after everything is processed
|
||||
|
@ -106,13 +106,13 @@ public class PlayerAuth {
|
||||
}
|
||||
|
||||
public String getHash() {
|
||||
if(salt != null && !salt.isEmpty() && Settings.getPasswordHash == HashAlgorithm.MD5VB) {
|
||||
vBhash = "$MD5vb$"+salt+"$"+hash;
|
||||
return vBhash;
|
||||
}
|
||||
else {
|
||||
return hash;
|
||||
}
|
||||
if (Settings.getPasswordHash == HashAlgorithm.MD5VB) {
|
||||
if(salt != null && !salt.isEmpty() && Settings.getPasswordHash == HashAlgorithm.MD5VB) {
|
||||
vBhash = "$MD5vb$"+salt+"$"+hash;
|
||||
return vBhash;
|
||||
}
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
public String getSalt() {
|
||||
|
@ -4,6 +4,8 @@ import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
@ -134,7 +136,7 @@ public class FileCache {
|
||||
}
|
||||
// can enchant item? size ofstring in file - 4 all / 2 = number of enchant
|
||||
if (in[0].equals("i")) {
|
||||
stacki[i] = new ItemStack(Integer.parseInt(in[1]),
|
||||
stacki[i] = new ItemStack(Material.getMaterial(Integer.parseInt(in[1])),
|
||||
Integer.parseInt(in[2]), Short.parseShort((in[3])));
|
||||
if(in.length > 4 && !in[4].isEmpty()) {
|
||||
for(int k=4;k<in.length-1;k++) {
|
||||
@ -144,7 +146,7 @@ public class FileCache {
|
||||
}
|
||||
i++;
|
||||
} else {
|
||||
stacka[a] = new ItemStack(Integer.parseInt(in[1]),
|
||||
stacka[a] = new ItemStack(Material.getMaterial(Integer.parseInt(in[1])),
|
||||
Integer.parseInt(in[2]), Short.parseShort((in[3])));
|
||||
if(in.length > 4 && !in[4].isEmpty()) {
|
||||
for(int k=4;k<in.length-1;k++) {
|
||||
|
@ -31,7 +31,7 @@ public class LimboCache {
|
||||
String name = player.getName().toLowerCase();
|
||||
Location loc = player.getLocation();
|
||||
loc.setY(loc.getY() + 0.4D);
|
||||
int gameMode = player.getGameMode().getValue();
|
||||
GameMode gameMode = player.getGameMode();
|
||||
ItemStack[] arm;
|
||||
ItemStack[] inv;
|
||||
boolean operator;
|
||||
@ -78,7 +78,7 @@ public class LimboCache {
|
||||
player.sendMessage("Your inventory has been cleaned!");
|
||||
}
|
||||
}
|
||||
gameMode = 0;
|
||||
gameMode = GameMode.SURVIVAL;
|
||||
}
|
||||
if(player.isDead()) {
|
||||
loc = plugin.getSpawnLocation(player.getWorld());
|
||||
|
@ -1,5 +1,6 @@
|
||||
package fr.xephi.authme.cache.limbo;
|
||||
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
@ -11,12 +12,12 @@ public class LimboPlayer {
|
||||
private Location loc = null;
|
||||
private int timeoutTaskId = -1;
|
||||
private int messageTaskId = -1;
|
||||
private int gameMode = 0;
|
||||
private GameMode gameMode = GameMode.SURVIVAL;
|
||||
private boolean operator = false;
|
||||
private String group = null;
|
||||
private boolean flying = false;
|
||||
|
||||
public LimboPlayer(String name, Location loc, ItemStack[] inventory, ItemStack[] armour, int gameMode, boolean operator, String group, boolean flying) {
|
||||
public LimboPlayer(String name, Location loc, ItemStack[] inventory, ItemStack[] armour, GameMode gameMode, boolean operator, String group, boolean flying) {
|
||||
this.name = name;
|
||||
this.loc = loc;
|
||||
this.inventory = inventory;
|
||||
@ -27,7 +28,7 @@ public class LimboPlayer {
|
||||
this.flying = flying;
|
||||
}
|
||||
|
||||
public LimboPlayer(String name, Location loc, int gameMode, boolean operator, String group, boolean flying) {
|
||||
public LimboPlayer(String name, Location loc, GameMode gameMode, boolean operator, String group, boolean flying) {
|
||||
this.name = name;
|
||||
this.loc = loc;
|
||||
this.gameMode = gameMode;
|
||||
@ -65,7 +66,7 @@ public class LimboPlayer {
|
||||
this.inventory = inventory;
|
||||
}
|
||||
|
||||
public int getGameMode() {
|
||||
public GameMode getGameMode() {
|
||||
return gameMode;
|
||||
}
|
||||
|
||||
|
@ -55,6 +55,10 @@ public class AdminCommand implements CommandExecutor {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command cmnd, String label, String[] args) {
|
||||
if (!plugin.authmePermissible(sender, "authme.admin." + args[0].toLowerCase())) {
|
||||
m._(sender, "no_perm");
|
||||
return true;
|
||||
}
|
||||
if (args.length == 0) {
|
||||
sender.sendMessage("Usage: /authme reload - Reload the config");
|
||||
sender.sendMessage("/authme register <playername> <password> - Register a player");
|
||||
@ -86,11 +90,6 @@ public class AdminCommand implements CommandExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!plugin.authmePermissible(sender, "authme.admin." + args[0].toLowerCase())) {
|
||||
sender.sendMessage(m._("no_perm"));
|
||||
return true;
|
||||
}
|
||||
|
||||
if (args[0].equalsIgnoreCase("version")) {
|
||||
sender.sendMessage("AuthMe Version: "+AuthMe.getInstance().getDescription().getVersion());
|
||||
return true;
|
||||
@ -151,7 +150,7 @@ public class AdminCommand implements CommandExecutor {
|
||||
Settings.reloadConfigOptions(newConfig);
|
||||
m.reLoad();
|
||||
s.reLoad();
|
||||
sender.sendMessage(m._("reload"));
|
||||
m._(sender, "reload");
|
||||
} else if (args[0].equalsIgnoreCase("lastlogin")) {
|
||||
if (args.length != 2) {
|
||||
sender.sendMessage("Usage: /authme lastlogin <playername>");
|
||||
@ -270,7 +269,7 @@ public class AdminCommand implements CommandExecutor {
|
||||
try {
|
||||
String name = args[1].toLowerCase();
|
||||
if (database.isAuthAvailable(name)) {
|
||||
sender.sendMessage(m._("user_regged"));
|
||||
m._(sender, "user_regged");
|
||||
return true;
|
||||
}
|
||||
String hash = PasswordSecurity.getHash(Settings.getPasswordHash, args[2], name);
|
||||
@ -280,14 +279,14 @@ public class AdminCommand implements CommandExecutor {
|
||||
else
|
||||
auth.setSalt("");
|
||||
if (!database.saveAuth(auth)) {
|
||||
sender.sendMessage(m._("error"));
|
||||
m._(sender, "error");
|
||||
return true;
|
||||
}
|
||||
sender.sendMessage(m._("registered"));
|
||||
m._(sender, "registered");
|
||||
ConsoleLogger.info(args[1] + " registered");
|
||||
} catch (NoSuchAlgorithmException ex) {
|
||||
ConsoleLogger.showError(ex.getMessage());
|
||||
sender.sendMessage(m._("error"));
|
||||
m._(sender, "error");
|
||||
}
|
||||
return true;
|
||||
} else if (args[0].equalsIgnoreCase("convertflattosql")) {
|
||||
@ -352,7 +351,7 @@ public class AdminCommand implements CommandExecutor {
|
||||
}
|
||||
getAuth.setEmail(args[2]);
|
||||
if (!database.updateEmail(getAuth)) {
|
||||
sender.sendMessage(m._("error"));
|
||||
m._(sender, "error");
|
||||
return true;
|
||||
}
|
||||
if (PlayerCache.getInstance().getAuth(playername) != null)
|
||||
@ -434,13 +433,13 @@ public class AdminCommand implements CommandExecutor {
|
||||
} else if (database.isAuthAvailable(name)) {
|
||||
auth = database.getAuth(name);
|
||||
} else {
|
||||
sender.sendMessage(m._("unknown_user"));
|
||||
m._(sender, "unknown_user");
|
||||
return true;
|
||||
}
|
||||
auth.setHash(hash);
|
||||
auth.setSalt(PasswordSecurity.userSalt.get(name));
|
||||
if (!database.updatePassword(auth)) {
|
||||
sender.sendMessage(m._("error"));
|
||||
m._(sender, "error");
|
||||
return true;
|
||||
}
|
||||
database.updateSalt(auth);
|
||||
@ -448,7 +447,7 @@ public class AdminCommand implements CommandExecutor {
|
||||
ConsoleLogger.info(args[1] + "'s password changed");
|
||||
} catch (NoSuchAlgorithmException ex) {
|
||||
ConsoleLogger.showError(ex.getMessage());
|
||||
sender.sendMessage(m._("error"));
|
||||
m._(sender, "error");
|
||||
}
|
||||
return true;
|
||||
} else if (args[0].equalsIgnoreCase("unregister") || args[0].equalsIgnoreCase("unreg") || args[0].equalsIgnoreCase("del") ) {
|
||||
@ -458,7 +457,7 @@ public class AdminCommand implements CommandExecutor {
|
||||
}
|
||||
String name = args[1].toLowerCase();
|
||||
if (!database.removeAuth(name)) {
|
||||
sender.sendMessage(m._("error"));
|
||||
m._(sender, "error");
|
||||
return true;
|
||||
}
|
||||
PlayerCache.getInstance().removePlayer(name);
|
||||
|
@ -34,27 +34,27 @@ public class CaptchaCommand implements CommandExecutor {
|
||||
String name = player.getName().toLowerCase();
|
||||
|
||||
if (args.length == 0) {
|
||||
player.sendMessage(m._("usage_captcha"));
|
||||
m._(player, "usage_captcha");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (PlayerCache.getInstance().isAuthenticated(name)) {
|
||||
player.sendMessage(m._("logged_in"));
|
||||
m._(player, "logged_in");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!plugin.authmePermissible(player, "authme." + label.toLowerCase())) {
|
||||
player.sendMessage(m._("no_perm"));
|
||||
m._(player, "no_perm");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!Settings.useCaptcha) {
|
||||
player.sendMessage(m._("usage_log"));
|
||||
m._(player, "usage_log");
|
||||
return true;
|
||||
}
|
||||
|
||||
if(!plugin.cap.containsKey(name)) {
|
||||
player.sendMessage(m._("usage_log"));
|
||||
m._(player, "usage_log");
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -69,8 +69,8 @@ public class CaptchaCommand implements CommandExecutor {
|
||||
plugin.cap.remove(name);
|
||||
} catch (NullPointerException npe) {
|
||||
}
|
||||
player.sendMessage(m._("valid_captcha"));
|
||||
player.sendMessage(m._("login_msg"));
|
||||
m._(player, "valid_captcha");
|
||||
m._(player, "login_msg");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -37,19 +37,19 @@ public class ChangePasswordCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
if (!plugin.authmePermissible(sender, "authme." + label.toLowerCase())) {
|
||||
sender.sendMessage(m._("no_perm"));
|
||||
m._(sender, "no_perm");
|
||||
return true;
|
||||
}
|
||||
|
||||
Player player = (Player) sender;
|
||||
String name = player.getName().toLowerCase();
|
||||
if (!PlayerCache.getInstance().isAuthenticated(name)) {
|
||||
player.sendMessage(m._("not_logged_in"));
|
||||
m._(player, "not_logged_in");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (args.length != 2) {
|
||||
player.sendMessage(m._("usage_changepassword"));
|
||||
m._(player, "usage_changepassword");
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -64,22 +64,22 @@ public class ChangePasswordCommand implements CommandExecutor {
|
||||
else
|
||||
auth.setSalt("");
|
||||
if (!database.updatePassword(auth)) {
|
||||
player.sendMessage(m._("error"));
|
||||
m._(player, "error");
|
||||
return true;
|
||||
}
|
||||
database.updateSalt(auth);
|
||||
PlayerCache.getInstance().updatePlayer(auth);
|
||||
player.sendMessage(m._("pwd_changed"));
|
||||
m._(player, "pwd_changed");
|
||||
ConsoleLogger.info(player.getName() + " changed his password");
|
||||
if(plugin.notifications != null) {
|
||||
plugin.notifications.showNotification(new Notification("[AuthMe] " + player.getName() + " change his password!"));
|
||||
}
|
||||
} else {
|
||||
player.sendMessage(m._("wrong_pwd"));
|
||||
m._(player, "wrong_pwd");
|
||||
}
|
||||
} catch (NoSuchAlgorithmException ex) {
|
||||
ConsoleLogger.showError(ex.getMessage());
|
||||
sender.sendMessage(m._("error"));
|
||||
m._(sender, "error");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ public class EmailCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
if (!plugin.authmePermissible(sender, "authme." + label.toLowerCase())) {
|
||||
sender.sendMessage(m._("no_perm"));
|
||||
m._(sender, "no_perm");
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -48,89 +48,89 @@ public class EmailCommand implements CommandExecutor {
|
||||
String name = player.getName().toLowerCase();
|
||||
|
||||
if (args.length == 0) {
|
||||
player.sendMessage(m._("usage_email_add"));
|
||||
player.sendMessage(m._("usage_email_change"));
|
||||
player.sendMessage(m._("usage_email_recovery"));
|
||||
m._(player, "usage_email_add");
|
||||
m._(player, "usage_email_change");
|
||||
m._(player, "usage_email_recovery");
|
||||
return true;
|
||||
}
|
||||
|
||||
if(args[0].equalsIgnoreCase("add")) {
|
||||
if (args.length != 3) {
|
||||
player.sendMessage(m._("usage_email_add"));
|
||||
m._(player, "usage_email_add");
|
||||
return true;
|
||||
}
|
||||
if(args[1].equals(args[2]) && PlayerCache.getInstance().isAuthenticated(name)) {
|
||||
PlayerAuth auth = PlayerCache.getInstance().getAuth(name);
|
||||
if (auth.getEmail() == null || (!auth.getEmail().equals("your@email.com") && !auth.getEmail().isEmpty())) {
|
||||
player.sendMessage("usage_email_change");
|
||||
m._(player, "usage_email_change");
|
||||
return true;
|
||||
}
|
||||
if (!args[1].contains("@")) {
|
||||
player.sendMessage(m._("email_invalid"));
|
||||
m._(player, "email_invalid");
|
||||
return true;
|
||||
}
|
||||
auth.setEmail(args[1]);
|
||||
if (!data.updateEmail(auth)) {
|
||||
player.sendMessage(m._("error"));
|
||||
m._(player, "error");
|
||||
return true;
|
||||
}
|
||||
PlayerCache.getInstance().updatePlayer(auth);
|
||||
player.sendMessage(m._("email_added"));
|
||||
m._(player, "email_added");
|
||||
player.sendMessage(auth.getEmail());
|
||||
} else if (PlayerCache.getInstance().isAuthenticated(name)){
|
||||
player.sendMessage(m._("email_confirm"));
|
||||
m._(player, "email_confirm");
|
||||
} else {
|
||||
if (!data.isAuthAvailable(name)) {
|
||||
player.sendMessage(m._("login_msg"));
|
||||
m._(player, "login_msg");
|
||||
} else {
|
||||
player.sendMessage(m._("reg_email_msg"));
|
||||
m._(player, "reg_email_msg");
|
||||
}
|
||||
}
|
||||
} else if(args[0].equalsIgnoreCase("change") && args.length == 3 ) {
|
||||
if(PlayerCache.getInstance().isAuthenticated(name)) {
|
||||
PlayerAuth auth = PlayerCache.getInstance().getAuth(name);
|
||||
if (auth.getEmail() == null || auth.getEmail().equals("your@email.com") || auth.getEmail().isEmpty()) {
|
||||
player.sendMessage(m._("usage_email_add"));
|
||||
m._(player, "usage_email_add");
|
||||
return true;
|
||||
}
|
||||
if (!args[1].equals(auth.getEmail())) {
|
||||
player.sendMessage(m._("old_email_invalid"));
|
||||
m._(player, "old_email_invalid");
|
||||
return true;
|
||||
}
|
||||
if (!args[2].contains("@")) {
|
||||
player.sendMessage(m._("new_email_invalid"));
|
||||
m._(player, "new_email_invalid");
|
||||
return true;
|
||||
}
|
||||
auth.setEmail(args[2]);
|
||||
if (!data.updateEmail(auth)) {
|
||||
player.sendMessage(m._("bad_database_email"));
|
||||
m._(player, "error");
|
||||
return true;
|
||||
}
|
||||
PlayerCache.getInstance().updatePlayer(auth);
|
||||
player.sendMessage(m._("email_changed"));
|
||||
m._(player, "email_changed");
|
||||
player.sendMessage(m._("email_defined") + auth.getEmail());
|
||||
} else if (PlayerCache.getInstance().isAuthenticated(name)){
|
||||
player.sendMessage(m._("email_confirm"));
|
||||
m._(player, "email_confirm");
|
||||
} else {
|
||||
if (!data.isAuthAvailable(name)) {
|
||||
player.sendMessage(m._("login_msg"));
|
||||
m._(player, "login_msg");
|
||||
} else {
|
||||
player.sendMessage(m._("reg_email_msg"));
|
||||
m._(player, "reg_email_msg");
|
||||
}
|
||||
}
|
||||
}
|
||||
if(args[0].equalsIgnoreCase("recovery")) {
|
||||
if (args.length != 2) {
|
||||
player.sendMessage(m._("usage_email_recovery"));
|
||||
m._(player, "usage_email_recovery");
|
||||
return true;
|
||||
}
|
||||
if (plugin.mail == null) {
|
||||
player.sendMessage(m._("error"));
|
||||
m._(player, "error");
|
||||
return true;
|
||||
}
|
||||
if (data.isAuthAvailable(name)) {
|
||||
if (PlayerCache.getInstance().isAuthenticated(name)) {
|
||||
player.sendMessage(m._("logged_in"));
|
||||
m._(player, "logged_in");
|
||||
return true;
|
||||
}
|
||||
try {
|
||||
@ -143,16 +143,16 @@ public class EmailCommand implements CommandExecutor {
|
||||
} else if (data.isAuthAvailable(name)) {
|
||||
auth = data.getAuth(name);
|
||||
} else {
|
||||
sender.sendMessage(m._("unknown_user"));
|
||||
m._(player, "unknown_user");
|
||||
return true;
|
||||
}
|
||||
if (Settings.getmailAccount.equals("") || Settings.getmailAccount.isEmpty()) {
|
||||
player.sendMessage(m._("error"));
|
||||
m._(player, "error");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!args[1].equalsIgnoreCase(auth.getEmail())) {
|
||||
player.sendMessage(m._("email_invalid"));
|
||||
m._(player, "email_invalid");
|
||||
return true;
|
||||
}
|
||||
final String finalhashnew = hashnew;
|
||||
@ -170,16 +170,16 @@ public class EmailCommand implements CommandExecutor {
|
||||
});
|
||||
}
|
||||
plugin.mail.main(auth, thePass);
|
||||
player.sendMessage(m._("email_send"));
|
||||
m._(player, "email_send");
|
||||
} catch (NoSuchAlgorithmException ex) {
|
||||
ConsoleLogger.showError(ex.getMessage());
|
||||
sender.sendMessage(m._("error"));
|
||||
m._(sender, "error");
|
||||
} catch (NoClassDefFoundError ncdfe) {
|
||||
ConsoleLogger.showError(ncdfe.getMessage());
|
||||
sender.sendMessage(m._("error"));
|
||||
m._(sender, "error");
|
||||
}
|
||||
} else {
|
||||
player.sendMessage(m._("reg_email_msg"));
|
||||
m._(player, "reg_email_msg");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -27,12 +27,12 @@ public class LoginCommand implements CommandExecutor {
|
||||
final Player player = (Player) sender;
|
||||
|
||||
if (args.length == 0) {
|
||||
player.sendMessage(m._("usage_log"));
|
||||
m._(player, "usage_log");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!plugin.authmePermissible(player, "authme." + label.toLowerCase())) {
|
||||
player.sendMessage(m._("no_perm"));
|
||||
m._(player, "no_perm");
|
||||
return true;
|
||||
}
|
||||
plugin.management.performLogin(player, args[0], false, false);
|
||||
|
@ -7,7 +7,6 @@ import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.scheduler.BukkitScheduler;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
|
||||
@ -50,7 +49,7 @@ public class LogoutCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
if (!plugin.authmePermissible(sender, "authme." + label.toLowerCase())) {
|
||||
sender.sendMessage(m._("no_perm"));
|
||||
m._(sender, "no_perm");
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -58,7 +57,7 @@ public class LogoutCommand implements CommandExecutor {
|
||||
String name = player.getName().toLowerCase();
|
||||
|
||||
if (!PlayerCache.getInstance().isAuthenticated(name)) {
|
||||
player.sendMessage(m._("not_logged_in"));
|
||||
m._(player, "not_logged_in");
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -119,7 +118,7 @@ public class LogoutCommand implements CommandExecutor {
|
||||
player.getVehicle().eject();
|
||||
} catch (NullPointerException npe) {
|
||||
}
|
||||
player.sendMessage(m._("logout"));
|
||||
m._(player, "logout");
|
||||
ConsoleLogger.info(player.getDisplayName() + " logged out");
|
||||
if(plugin.notifications != null) {
|
||||
plugin.notifications.showNotification(new Notification("[AuthMe] " + player.getName() + " logged out!"));
|
||||
|
@ -28,7 +28,7 @@ public class PasspartuCommand implements CommandExecutor {
|
||||
public boolean onCommand(CommandSender sender, Command cmnd, String label, String[] args) {
|
||||
|
||||
if (!plugin.authmePermissible(sender, "authme." + label.toLowerCase())) {
|
||||
sender.sendMessage(m._("no_perm"));
|
||||
m._(sender, "no_perm");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ public class RegisterCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
if (!plugin.authmePermissible(sender, "authme." + label.toLowerCase())) {
|
||||
sender.sendMessage(m._("no_perm"));
|
||||
m._(sender, "no_perm");
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -71,17 +71,17 @@ public class RegisterCommand implements CommandExecutor {
|
||||
final String ip = ipA;
|
||||
|
||||
if (PlayerCache.getInstance().isAuthenticated(name)) {
|
||||
player.sendMessage(m._("logged_in"));
|
||||
m._(player, "logged_in");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!Settings.isRegistrationEnabled) {
|
||||
player.sendMessage(m._("reg_disabled"));
|
||||
m._(player, "reg_disabled");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (database.isAuthAvailable(player.getName().toLowerCase())) {
|
||||
player.sendMessage(m._("user_regged"));
|
||||
m._(player, "user_regged");
|
||||
if (pllog.getStringList("players").contains(player.getName())) {
|
||||
pllog.getStringList("players").remove(player.getName());
|
||||
}
|
||||
@ -90,30 +90,30 @@ public class RegisterCommand implements CommandExecutor {
|
||||
|
||||
if(Settings.getmaxRegPerIp > 0 ){
|
||||
if(!plugin.authmePermissible(sender, "authme.allow2accounts") && database.getAllAuthsByIp(ipA).size() >= Settings.getmaxRegPerIp) {
|
||||
player.sendMessage(m._("max_reg"));
|
||||
m._(player, "max_reg");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if(Settings.emailRegistration && !Settings.getmailAccount.isEmpty()) {
|
||||
if(!args[0].contains("@")) {
|
||||
player.sendMessage(m._("usage_reg"));
|
||||
m._(player, "usage_reg");
|
||||
return true;
|
||||
}
|
||||
if(Settings.doubleEmailCheck) {
|
||||
if(args.length < 2) {
|
||||
player.sendMessage(m._("usage_reg"));
|
||||
m._(player, "usage_reg");
|
||||
return true;
|
||||
}
|
||||
if(!args[0].equals(args[1])) {
|
||||
player.sendMessage(m._("usage_reg"));
|
||||
m._(player, "usage_reg");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
final String email = args[0];
|
||||
if(Settings.getmaxRegPerEmail > 0) {
|
||||
if (!plugin.authmePermissible(sender, "authme.allow2accounts") && database.getAllAuthsByEmail(email).size() >= Settings.getmaxRegPerEmail) {
|
||||
player.sendMessage(m._("max_reg"));
|
||||
m._(player, "max_reg");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -152,7 +152,7 @@ public class RegisterCommand implements CommandExecutor {
|
||||
if(!Settings.getRegisteredGroup.isEmpty()){
|
||||
Utils.getInstance().setGroup(player, Utils.groupType.REGISTERED);
|
||||
}
|
||||
player.sendMessage(m._("vb_nonActiv"));
|
||||
m._(player, "vb_nonActiv");
|
||||
String msg = m._("login_msg");
|
||||
int time = Settings.getRegistrationTimeout * 20;
|
||||
int msgInterval = Settings.getWarnMessageInterval;
|
||||
@ -195,12 +195,12 @@ public class RegisterCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
if (args.length == 0 || (Settings.getEnablePasswordVerifier && args.length < 2) ) {
|
||||
player.sendMessage(m._("usage_reg"));
|
||||
m._(player, "usage_reg");
|
||||
return true;
|
||||
}
|
||||
|
||||
if(args[0].length() < Settings.getPasswordMinLen || args[0].length() > Settings.passwordMaxLength) {
|
||||
player.sendMessage(m._("pass_len"));
|
||||
m._(player, "pass_len");
|
||||
return true;
|
||||
}
|
||||
try {
|
||||
@ -209,7 +209,7 @@ public class RegisterCommand implements CommandExecutor {
|
||||
if (args[0].equals(args[1])) {
|
||||
hash = PasswordSecurity.getHash(Settings.getPasswordHash, args[0], name);
|
||||
} else {
|
||||
player.sendMessage(m._("password_error"));
|
||||
m._(player, "password_error");
|
||||
return true;
|
||||
}
|
||||
} else
|
||||
@ -221,13 +221,13 @@ public class RegisterCommand implements CommandExecutor {
|
||||
auth = new PlayerAuth(name, hash, PasswordSecurity.userSalt.get(name), ip, new Date().getTime(), player.getName());
|
||||
}
|
||||
if (!database.saveAuth(auth)) {
|
||||
player.sendMessage(m._("error"));
|
||||
m._(player, "error");
|
||||
return true;
|
||||
}
|
||||
PlayerCache.getInstance().addPlayer(auth);
|
||||
LimboPlayer limbo = LimboCache.getInstance().getLimboPlayer(name);
|
||||
if (limbo != null) {
|
||||
player.setGameMode(GameMode.getByValue(limbo.getGameMode()));
|
||||
player.setGameMode(limbo.getGameMode());
|
||||
if (Settings.isTeleportToSpawnEnabled) {
|
||||
World world = player.getWorld();
|
||||
Location loca = plugin.getSpawnLocation(world);
|
||||
@ -248,9 +248,9 @@ public class RegisterCommand implements CommandExecutor {
|
||||
if(!Settings.getRegisteredGroup.isEmpty()){
|
||||
Utils.getInstance().setGroup(player, Utils.groupType.REGISTERED);
|
||||
}
|
||||
player.sendMessage(m._("registered"));
|
||||
m._(player, "registered");
|
||||
if (!Settings.getmailAccount.isEmpty())
|
||||
player.sendMessage(m._("add_email"));
|
||||
m._(player, "add_email");
|
||||
this.isFirstTimeJoin = true;
|
||||
if (player.getGameMode() != GameMode.CREATIVE && !Settings.isMovementAllowed) {
|
||||
player.setAllowFlight(false);
|
||||
@ -264,7 +264,7 @@ public class RegisterCommand implements CommandExecutor {
|
||||
}
|
||||
} catch (NoSuchAlgorithmException ex) {
|
||||
ConsoleLogger.showError(ex.getMessage());
|
||||
sender.sendMessage(m._("error"));
|
||||
m._(sender, "error");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ public class UnregisterCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
if (!plugin.authmePermissible(sender, "authme." + label.toLowerCase())) {
|
||||
sender.sendMessage(m._("no_perm"));
|
||||
m._(sender, "no_perm");
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -57,12 +57,12 @@ public class UnregisterCommand implements CommandExecutor {
|
||||
String name = player.getName().toLowerCase();
|
||||
|
||||
if (!PlayerCache.getInstance().isAuthenticated(name)) {
|
||||
player.sendMessage(m._("not_logged_in"));
|
||||
m._(player, "not_logged_in");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (args.length != 1) {
|
||||
player.sendMessage(m._("usage_unreg"));
|
||||
m._(player, "usage_unreg");
|
||||
return true;
|
||||
}
|
||||
try {
|
||||
@ -125,7 +125,7 @@ public class UnregisterCommand implements CommandExecutor {
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
player.sendMessage(m._("wrong_pwd"));
|
||||
m._(player, "wrong_pwd");
|
||||
}
|
||||
} catch (NoSuchAlgorithmException ex) {
|
||||
ConsoleLogger.showError(ex.getMessage());
|
||||
|
@ -64,8 +64,8 @@ import fr.xephi.authme.task.TimeoutTask;
|
||||
|
||||
public class AuthMePlayerListener implements Listener {
|
||||
|
||||
public static int gm = 0;
|
||||
public static HashMap<String, Integer> gameMode = new HashMap<String, Integer>();
|
||||
public static GameMode gm = GameMode.SURVIVAL;
|
||||
public static HashMap<String, GameMode> gameMode = new HashMap<String, GameMode>();
|
||||
public static HashMap<String, String> joinMessage = new HashMap<String, String>();
|
||||
private Utils utils = Utils.getInstance();
|
||||
private Messages m = Messages.getInstance();
|
||||
@ -132,16 +132,16 @@ public class AuthMePlayerListener implements Listener {
|
||||
String cmd = event.getMessage().split(" ")[0];
|
||||
|
||||
if (data.isAuthAvailable(name)) {
|
||||
player.sendMessage(m._("login_msg"));
|
||||
m._(player, "login_msg");
|
||||
} else {
|
||||
if (!Settings.isForcedRegistrationEnabled) {
|
||||
return;
|
||||
}
|
||||
if (Settings.emailRegistration) {
|
||||
player.sendMessage(m._("reg_email_msg"));
|
||||
m._(player, "reg_email_msg");
|
||||
return;
|
||||
} else {
|
||||
player.sendMessage(m._("reg_msg"));
|
||||
m._(player, "reg_msg");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -169,16 +169,16 @@ public class AuthMePlayerListener implements Listener {
|
||||
String cmd = event.getMessage().split(" ")[0];
|
||||
|
||||
if (data.isAuthAvailable(name)) {
|
||||
player.sendMessage(m._("login_msg"));
|
||||
m._(player, "login_msg");
|
||||
} else {
|
||||
if (!Settings.isForcedRegistrationEnabled) {
|
||||
return;
|
||||
}
|
||||
if (Settings.emailRegistration) {
|
||||
player.sendMessage(m._("reg_email_msg"));
|
||||
m._(player, "reg_email_msg");
|
||||
return;
|
||||
} else {
|
||||
player.sendMessage(m._("reg_msg"));
|
||||
m._(player, "reg_msg");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -206,16 +206,16 @@ public class AuthMePlayerListener implements Listener {
|
||||
String cmd = event.getMessage().split(" ")[0];
|
||||
|
||||
if (data.isAuthAvailable(name)) {
|
||||
player.sendMessage(m._("login_msg"));
|
||||
m._(player, "login_msg");
|
||||
} else {
|
||||
if (!Settings.isForcedRegistrationEnabled) {
|
||||
return;
|
||||
}
|
||||
if (Settings.emailRegistration) {
|
||||
player.sendMessage(m._("reg_email_msg"));
|
||||
m._(player, "reg_email_msg");
|
||||
return;
|
||||
} else {
|
||||
player.sendMessage(m._("reg_msg"));
|
||||
m._(player, "reg_msg");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -243,16 +243,16 @@ public class AuthMePlayerListener implements Listener {
|
||||
String cmd = event.getMessage().split(" ")[0];
|
||||
|
||||
if (data.isAuthAvailable(name)) {
|
||||
player.sendMessage(m._("login_msg"));
|
||||
m._(player, "login_msg");
|
||||
} else {
|
||||
if (!Settings.isForcedRegistrationEnabled) {
|
||||
return;
|
||||
}
|
||||
if (Settings.emailRegistration) {
|
||||
player.sendMessage(m._("reg_email_msg"));
|
||||
m._(player, "reg_email_msg");
|
||||
return;
|
||||
} else {
|
||||
player.sendMessage(m._("reg_msg"));
|
||||
m._(player, "reg_msg");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -280,16 +280,16 @@ public class AuthMePlayerListener implements Listener {
|
||||
String cmd = event.getMessage().split(" ")[0];
|
||||
|
||||
if (data.isAuthAvailable(name)) {
|
||||
player.sendMessage(m._("login_msg"));
|
||||
m._(player, "login_msg");
|
||||
} else {
|
||||
if (!Settings.isForcedRegistrationEnabled) {
|
||||
return;
|
||||
}
|
||||
if (Settings.emailRegistration) {
|
||||
player.sendMessage(m._("reg_email_msg"));
|
||||
m._(player, "reg_email_msg");
|
||||
return;
|
||||
} else {
|
||||
player.sendMessage(m._("reg_msg"));
|
||||
m._(player, "reg_msg");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -317,15 +317,15 @@ public class AuthMePlayerListener implements Listener {
|
||||
String cmd = event.getMessage().split(" ")[0];
|
||||
|
||||
if (data.isAuthAvailable(name)) {
|
||||
player.sendMessage(m._("login_msg"));
|
||||
m._(player, "login_msg");
|
||||
} else {
|
||||
if (!Settings.isForcedRegistrationEnabled) {
|
||||
return;
|
||||
}
|
||||
if (Settings.emailRegistration) {
|
||||
player.sendMessage(m._("reg_email_msg"));
|
||||
m._(player, "reg_email_msg");
|
||||
} else {
|
||||
player.sendMessage(m._("reg_msg"));
|
||||
m._(player, "reg_msg");
|
||||
}
|
||||
}
|
||||
|
||||
@ -537,7 +537,7 @@ public class AuthMePlayerListener implements Listener {
|
||||
Player player = event.getPlayer();
|
||||
World world = player.getWorld();
|
||||
Location spawnLoc = plugin.getSpawnLocation(world);
|
||||
gm = player.getGameMode().getValue();
|
||||
gm = player.getGameMode();
|
||||
final String name = player.getName().toLowerCase();
|
||||
gameMode.put(name, gm);
|
||||
BukkitScheduler sched = plugin.getServer().getScheduler();
|
||||
@ -558,9 +558,9 @@ public class AuthMePlayerListener implements Listener {
|
||||
ip = plugin.realIp.get(name);
|
||||
}
|
||||
if(Settings.isAllowRestrictedIp && !Settings.getRestrictedIp(name, ip)) {
|
||||
int gM = gameMode.get(name);
|
||||
GameMode gM = gameMode.get(name);
|
||||
this.causeByAuthMe = true;
|
||||
player.setGameMode(GameMode.getByValue(gM));
|
||||
player.setGameMode(gM);
|
||||
this.causeByAuthMe = false;
|
||||
player.kickPlayer("You are not the Owner of this account, please try another name!");
|
||||
if (Settings.banUnsafeIp)
|
||||
@ -581,12 +581,12 @@ public class AuthMePlayerListener implements Listener {
|
||||
} else {
|
||||
PlayerCache.getInstance().addPlayer(auth);
|
||||
}
|
||||
player.sendMessage(m._("valid_session"));
|
||||
m._(player, "valid_session");
|
||||
return;
|
||||
} else if (!Settings.sessionExpireOnIpChange){
|
||||
int gM = gameMode.get(name);
|
||||
GameMode gM = gameMode.get(name);
|
||||
this.causeByAuthMe = true;
|
||||
player.setGameMode(GameMode.getByValue(gM));
|
||||
player.setGameMode(gM);
|
||||
this.causeByAuthMe = false;
|
||||
player.kickPlayer(m._("unvalid_session"));
|
||||
return;
|
||||
@ -600,9 +600,9 @@ public class AuthMePlayerListener implements Listener {
|
||||
PlayerCache.getInstance().removePlayer(name);
|
||||
LimboCache.getInstance().addLimboPlayer(player , utils.removeAll(player));
|
||||
} else {
|
||||
int gM = gameMode.get(name);
|
||||
GameMode gM = gameMode.get(name);
|
||||
this.causeByAuthMe = true;
|
||||
player.setGameMode(GameMode.getByValue(gM));
|
||||
player.setGameMode(gM);
|
||||
this.causeByAuthMe = false;
|
||||
player.kickPlayer(m._("unvalid_session"));
|
||||
return;
|
||||
@ -698,7 +698,7 @@ public class AuthMePlayerListener implements Listener {
|
||||
return;
|
||||
Block b = player.getLocation().getBlock();
|
||||
if (b.getType() == Material.PORTAL || b.getType() == Material.ENDER_PORTAL || b.getType() == Material.LAVA || b.getType() == Material.STATIONARY_LAVA) {
|
||||
player.sendMessage(m._("unsafe_spawn"));
|
||||
m._(player, "unsafe_spawn");
|
||||
player.teleport(spawnLoc);
|
||||
return;
|
||||
}
|
||||
@ -827,7 +827,7 @@ public class AuthMePlayerListener implements Listener {
|
||||
API.setPlayerInventory(player, ev.getInventory(), ev.getArmor());
|
||||
}
|
||||
} catch (NullPointerException npe){
|
||||
ConsoleLogger.showError("Problem while restore " + name + "inventory after a kick");
|
||||
ConsoleLogger.showError("Problem while restore " + name + " inventory after a kick");
|
||||
}
|
||||
}
|
||||
try {
|
||||
|
@ -2,9 +2,8 @@ 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;
|
||||
|
||||
public class Messages extends CustomConfiguration {
|
||||
@ -66,11 +65,8 @@ public class Messages extends CustomConfiguration {
|
||||
this.save();
|
||||
}
|
||||
|
||||
public String _(String msg) {
|
||||
public void _(CommandSender sender, String msg) {
|
||||
String loc = (String) this.get(msg, this.getDefault(msg));
|
||||
if (loc != null) {
|
||||
return loc.replace("&", "\u00a7");
|
||||
}
|
||||
if (loc == null && !contains(msg)) {
|
||||
set(msg, this.getDefault(msg));
|
||||
save();
|
||||
@ -78,7 +74,22 @@ public class Messages extends CustomConfiguration {
|
||||
loc = (String) this.get(msg, this.getDefault(msg));
|
||||
}
|
||||
if (loc == null)
|
||||
return "Error with Translation files; Please contact the admin ";
|
||||
loc = "Error with Translation files; Please contact the admin ";
|
||||
for (String l : loc.split("&n")) {
|
||||
sender.sendMessage(l.replace("&", "\u00a7"));
|
||||
}
|
||||
}
|
||||
|
||||
public String _(String msg) {
|
||||
String loc = (String) this.get(msg, this.getDefault(msg));
|
||||
if (loc == null && !contains(msg)) {
|
||||
set(msg, this.getDefault(msg));
|
||||
save();
|
||||
load();
|
||||
loc = (String) this.get(msg, this.getDefault(msg));
|
||||
}
|
||||
if (loc == null)
|
||||
loc = "Error with Translation files; Please contact the admin ";
|
||||
return loc.replace("&", "\u00a7");
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ public final class Settings extends YamlConfiguration {
|
||||
useCaptcha, emailRegistration, multiverse, notifications, chestshop, bungee, banUnsafeIp, doubleEmailCheck, sessionExpireOnIpChange,
|
||||
disableSocialSpy, useMultiThreading, forceOnlyAfterLogin, useEssentialsMotd,
|
||||
usePurge, purgePlayerDat, purgeEssentialsFile, supportOldPassword, purgeLimitedCreative,
|
||||
purgeAntiXray, purgePermissions, enableProtection, enableAntiBot;
|
||||
purgeAntiXray, purgePermissions, enableProtection, enableAntiBot, recallEmail;
|
||||
|
||||
public static String getNickRegex, getUnloggedinGroup, getMySQLHost, getMySQLPort,
|
||||
getMySQLUsername, getMySQLPassword, getMySQLDatabase, getMySQLTablename,
|
||||
@ -62,7 +62,7 @@ public final class Settings extends YamlConfiguration {
|
||||
public static int getWarnMessageInterval, getSessionTimeout, getRegistrationTimeout, getMaxNickLength,
|
||||
getMinNickLength, getPasswordMinLen, getMovementRadius, getmaxRegPerIp, getNonActivatedGroup,
|
||||
passwordMaxLength, getRecoveryPassLength, getMailPort, maxLoginTry, captchaLength, saltLength, getmaxRegPerEmail,
|
||||
bCryptLog2Rounds, purgeDelay, getPhpbbGroup, antiBotSensibility, antiBotDuration;
|
||||
bCryptLog2Rounds, purgeDelay, getPhpbbGroup, antiBotSensibility, antiBotDuration, delayRecall;
|
||||
|
||||
protected static YamlConfiguration configFile;
|
||||
|
||||
@ -218,6 +218,8 @@ public void loadConfigOptions() {
|
||||
antiBotSensibility = configFile.getInt("Protection.antiBotSensibility", 5);
|
||||
antiBotDuration = configFile.getInt("Protection.antiBotDuration", 10);
|
||||
forceCommands = (List<String>) configFile.getList("settings.forceCommands", new ArrayList<String>());
|
||||
recallEmail = configFile.getBoolean("Email.recallPlayers", false);
|
||||
delayRecall = configFile.getInt("Email.delayRecall", 5);
|
||||
|
||||
saveDefaults();
|
||||
}
|
||||
@ -360,6 +362,8 @@ public static void reloadConfigOptions(YamlConfiguration newConfig) {
|
||||
antiBotSensibility = configFile.getInt("Protection.antiBotSensibility", 5);
|
||||
antiBotDuration = configFile.getInt("Protection.antiBotDuration", 10);
|
||||
forceCommands = (List<String>) configFile.getList("settings.forceCommands", new ArrayList<String>());
|
||||
recallEmail = configFile.getBoolean("Email.recallPlayers", false);
|
||||
delayRecall = configFile.getInt("Email.delayRecall", 5);
|
||||
}
|
||||
|
||||
public void mergeConfig() {
|
||||
@ -476,8 +480,13 @@ public void mergeConfig() {
|
||||
set("Protection.antiBotDuration", 10);
|
||||
if(!contains("settings.forceCommands"))
|
||||
set("settings.forceCommands", new ArrayList<String>());
|
||||
if(!contains("Email.recallPlayers"))
|
||||
set("Email.recallPlayers", false);
|
||||
if(!contains("Email.delayRecall"))
|
||||
set("Email.delayRecall", 5);
|
||||
|
||||
plugin.getLogger().info("Merge new Config Options if needed..");
|
||||
plugin.getLogger().warning("Merge new Config Options if needed..");
|
||||
plugin.getLogger().warning("Please check your config.yml file!");
|
||||
plugin.saveConfig();
|
||||
|
||||
return;
|
||||
@ -655,6 +664,6 @@ public void mergeConfig() {
|
||||
}
|
||||
|
||||
public enum messagesLang {
|
||||
en, de, br, cz, pl, fr, ru, hu, sk, es, zhtw, fi, zhcn, lt, it, ko, pt, nl
|
||||
en, de, br, cz, pl, fr, uk, ru, hu, sk, es, fi, zhtw, zhhk, zhcn, lt, it, ko, pt, nl
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,9 @@ public class MessageTask implements Runnable {
|
||||
|
||||
for (Player player : plugin.getServer().getOnlinePlayers()) {
|
||||
if (player.getName().toLowerCase().equals(name)) {
|
||||
player.sendMessage(msg);
|
||||
for (String ms : msg.split("\u00a7n")) {
|
||||
player.sendMessage(ms);
|
||||
}
|
||||
BukkitScheduler sched = plugin.getServer().getScheduler();
|
||||
BukkitTask late = sched.runTaskLater(plugin, this, interval * 20);
|
||||
if(LimboCache.getInstance().hasLimboPlayer(name)) {
|
||||
|
@ -45,9 +45,9 @@ public class TimeoutTask implements Runnable {
|
||||
playerCache.removeCache(name);
|
||||
}
|
||||
}
|
||||
int gm = AuthMePlayerListener.gameMode.get(name);
|
||||
player.setGameMode(GameMode.getByValue(gm));
|
||||
ConsoleLogger.info("Set " + player.getName() + " to gamemode: " + GameMode.getByValue(gm).name());
|
||||
GameMode gm = AuthMePlayerListener.gameMode.get(name);
|
||||
player.setGameMode(gm);
|
||||
ConsoleLogger.info("Set " + player.getName() + " to gamemode: " + gm.name());
|
||||
player.kickPlayer(m._("timeout"));
|
||||
break;
|
||||
}
|
||||
|
@ -321,6 +321,10 @@ Email:
|
||||
mailText: 'Dear <playername>, <br /><br /> This is your new AuthMe password for the server <br /><br /> <servername> : <br /><br /> <generatedpass><br /><br />Do not forget to change password after login! <br /> /changepassword <generatedpass> newPassword'
|
||||
# Like maxRegPerIp but with email
|
||||
maxRegPerEmail: 1
|
||||
# Recall players to add an email ?
|
||||
recallPlayers: false
|
||||
# Delay in minute for the recall scheduler
|
||||
delayRecall: 5
|
||||
Hooks:
|
||||
# Do we need to hook with multiverse for spawn checking?
|
||||
multiverse: true
|
||||
|
@ -52,6 +52,6 @@ email_added: '[AuthMe] Email agregado !'
|
||||
email_confirm: '[AuthMe] Confirma tu Email !'
|
||||
email_changed: '[AuthMe] Email cambiado !'
|
||||
email_send: '[AuthMe] Correo de recuperación enviado !'
|
||||
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'
|
||||
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'
|
||||
|
@ -1,15 +1,15 @@
|
||||
unknown_user: "L'utente non è nel database"
|
||||
unknown_user: "L'utente non è presente nel database"
|
||||
unsafe_spawn: 'Il tuo punto di logout non era sicuro, sei stato teletrasportato allo Spawn'
|
||||
not_logged_in: '&cNon loggato!'
|
||||
reg_voluntarily: 'Puoi registrare il tuo nickname nel server con "/register <password> <ConfermaPassword>"'
|
||||
usage_log: '&cUtilizzo: /login <password>'
|
||||
wrong_pwd: '&cPassword sbagliata'
|
||||
unregistered: '&cDe-registrato correttamente!'
|
||||
unregistered: '&cCancellato correttamente!'
|
||||
reg_disabled: '&cLe registrazioni sono disabilitate'
|
||||
valid_session: '&cLoggato attraverso la sessione'
|
||||
login: '&cLoggato correttamente!'
|
||||
vb_nonActiv: "Il tuo account non è ancora attivo, controlla le tue Email!"
|
||||
user_regged: "&cUtente già registrato"
|
||||
vb_nonActiv: 'Il tuo account non è ancora attivo, controlla le tue Email!'
|
||||
user_regged: '&cUtente già registrato'
|
||||
usage_reg: '&cUtilizzo: /register <password> <confermaPassword>'
|
||||
max_reg: 'Hai raggiunto il numero massimo di registrazioni per il tuo account'
|
||||
no_perm: '&cNessun Permesso'
|
||||
@ -18,39 +18,39 @@ login_msg: '&cPerfavore, loggati con "/login <password>"'
|
||||
reg_msg: '&cPerfavore, registrati con "/register <password> <confermaPassword>"'
|
||||
reg_email_msg: '&cPerfavore, registrati con "/register <email> <confermaEmail>"'
|
||||
usage_unreg: '&cUtilizzo: /unregister <password>'
|
||||
pwd_changed: '&cPassword cambiata!'
|
||||
pwd_changed: '&cPassword cambiata correttamente!'
|
||||
user_unknown: '&cUtente non registrato'
|
||||
password_error: 'La Password non corrisponde'
|
||||
password_error: 'Le Password non corrispondono'
|
||||
unvalid_session: "I tuoi dati non combaciano con l'ultima sessione. Per favore attendi la fine della sessione attuale"
|
||||
reg_only: "Possono entrare solo utenti registrati! Perfavore, vai su http://example.com per registrarti"
|
||||
logged_in: "&cSei già loggato!"
|
||||
reg_only: 'Possono entrare solo utenti registrati! Perfavore, vai su http://example.com per registrarti'
|
||||
logged_in: '&cSei già loggato!'
|
||||
logout: '&cDisconnesso correttamente'
|
||||
same_nick: "Lo stesso nickname è già online"
|
||||
same_nick: 'Lo stesso nickname è già online'
|
||||
registered: '&cRegistrato correttamente!'
|
||||
pass_len: "La tua password è troppo corta o troppo lunga"
|
||||
pass_len: 'La tua password è troppo corta o troppo lunga'
|
||||
reload: 'La configurazione e il database sono stati ricaricati'
|
||||
timeout: 'Timeout di Login'
|
||||
usage_changepassword: 'Utilizzo: /changepassword <vecchiaPassword> <nuovaPassword>'
|
||||
name_len: "&cIl tuo nickname è troppo corto o troppo lungo"
|
||||
name_len: '&cIl tuo nickname è troppo corto o troppo lungo'
|
||||
regex: '&cIl tuo nickname contiene caratteri strani. Caratteri abilitati: REG_EX'
|
||||
add_email: '&cPer una maggiore sicurezza, aggiungi una mail con : /email add <tuaEmail> <confermaEmail>'
|
||||
bad_database_email: "[AuthMe] Il comando /email è utilizzabile solo con MySQL o SQLite, contatta un admin"
|
||||
bad_database_email: '[AuthMe] Il comando /email è utilizzabile solo con MySQL o SQLite, contatta un admin'
|
||||
recovery_email: '&cDimenticata la tua password? Perfavore, fai /email recovery <tuaEmail>'
|
||||
usage_captcha: '&cUtilizzo: /captcha <ilCaptcha>'
|
||||
wrong_captcha: '&cCaptcha sbagliato, perfavore fai: /captcha THE_CAPTCHA'
|
||||
valid_captcha: "&cIl tuo captcha è valido!"
|
||||
kick_forvip: "&cUn player VIP è entrato mentre il server era pieno!"
|
||||
kick_fullserver: "&cIl server è attualmente pieno, ci dispiace!"
|
||||
valid_captcha: '&cIl tuo captcha è valido!'
|
||||
kick_forvip: '&cUn utente VIP è entrato mentre il server era pieno!'
|
||||
kick_fullserver: '&cIl server è attualmente pieno, riprova più tardi!'
|
||||
usage_email_add: '&fUtilizzo: /email add <email> <confermaEmail>'
|
||||
usage_email_change: '&fUtilizzo: /email change <vecchiaEmail> <nuovaEmail>'
|
||||
usage_email_recovery: '&fUtilizzo: /email recovery <email>'
|
||||
new_email_invalid: '[AuthMe] La nuova email non è valida!'
|
||||
old_email_invalid: '[AuthMe] La vecchia email non è valida!'
|
||||
email_invalid: "[AuthMe] L'email non è valida"
|
||||
email_added: '[AuthMe] Email Aggiunta!'
|
||||
new_email_invalid: '[AuthMe] La nuova Email non è valida!'
|
||||
old_email_invalid: '[AuthMe] La vecchia Email non è valida!'
|
||||
email_invalid: "[AuthMe] L'Email non è valida"
|
||||
email_added: '[AuthMe] Email aggiunta!'
|
||||
email_confirm: '[AuthMe] Conferma la tua Email!'
|
||||
email_changed: '[AuthMe] Email cambiata!'
|
||||
email_send: '[AuthMe] Email di recupero inviata!'
|
||||
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'
|
||||
country_banned: 'Il tuo paese è bannato su questo server'
|
||||
antibot_auto_enabled: '[AuthMe] AntiBotMod è stato automaticamente abilitato a seguito delle numerose connessioni!'
|
||||
antibot_auto_disabled: "[AuthMe] AntiBotMod è stato automaticamente disabilitato dopo %m Minuti, sperando che l'invasione sia finita"
|
||||
|
@ -36,8 +36,8 @@ regex: '&cO seu nickname contém caracteres não permitidos. Permitido: REG_EX'
|
||||
add_email: '&cPor favor adicione o seu email com : /email add seuEmail confirmarSeuEmail'
|
||||
bad_database_email: '[AuthMe] O comando /email não está disponível contacte o staff via ticket'
|
||||
recovery_email: '&cPerdeu a sua password? Para a recuperar escreva /email recovery <seuEmail>'
|
||||
usage_captcha: '&cUse: /captcha <theCaptcha>'
|
||||
wrong_captcha: '&cCaptcha errado, por favor use: /captcha THE_CAPTCHA'
|
||||
usage_captcha: '&cVocê precisa digitar um captcha, escreva: /captcha <theCaptcha>'
|
||||
wrong_captcha: '&cCaptcha errado, por favor escreva: /captcha THE_CAPTCHA'
|
||||
valid_captcha: '&cO seu captcha é válido!'
|
||||
kick_forvip: '&cUm jogador VIP entrou no servidor cheio!'
|
||||
kick_fullserver: '&cO servidor está actualmente cheio, lamentamos!'
|
||||
@ -52,6 +52,6 @@ email_added: 'Email adicionado com sucesso!'
|
||||
email_confirm: 'Confirme o seu email!'
|
||||
email_changed: 'Email alterado com sucesso!'
|
||||
email_send: 'Nova palavra-passe enviada para o seu email!'
|
||||
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'
|
||||
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'
|
56
src/main/resources/messages_uk.yml
Normal file
56
src/main/resources/messages_uk.yml
Normal file
@ -0,0 +1,56 @@
|
||||
unknown_user: '&fКористувача немає в базі даних'
|
||||
unsafe_spawn: '&fМісце вашого виходу було небезпечне тому ми телепортували вас на спавн'
|
||||
not_logged_in: '&cВи не ввійшли!'
|
||||
reg_voluntarily: '&eЩоб зарєєструватися введіть команду &d"/reg Пароль Повтор пароля"'
|
||||
usage_log: '&cВикористовуйте: /login Пароль'
|
||||
wrong_pwd: '&cНевірний пароль'
|
||||
unregistered: '&cВи успішно видалили свій акаунт!'
|
||||
reg_disabled: '&cРеєстрація виключена'
|
||||
valid_session: '&cСесія включена'
|
||||
login: '&2Успішна авторизація!'
|
||||
vb_nonActiv: '&fВаш акаунт не активований. Перевірте свою електронну адресу!'
|
||||
user_regged: '&cТакий користувач вже зареєстрований'
|
||||
usage_reg: '&cВикористовуйте: /reg Пароль Повтор пароля'
|
||||
max_reg: '&fВи перевищили максимальне число реєстрацій на акаунт'
|
||||
no_perm: '&cУ Вас недостатньо прав'
|
||||
error: '&fЩось пішло не так; Будь ласка зв`яжіться з адміністратором'
|
||||
login_msg: '&cДля авторизації введіть "/login Пароль"'
|
||||
reg_msg: '&cДля реєстрації введіть "/reg Пароль Повтор пароля"'
|
||||
reg_email_msg: '&cДля реєстрації введіть "/reg Email Email"'
|
||||
usage_unreg: '&cВикористовуйте: /unregister Пароль'
|
||||
pwd_changed: '&cПароль змінено!'
|
||||
user_unknown: '&cТакий користувач не зарєєстрований'
|
||||
password_error: '&fПаролі не співпадають'
|
||||
unvalid_session: '&fСесія некоректна. Будь ласка зачекайте коли вона закінчиться'
|
||||
reg_only: '&Вхід доступний лише зареєстрованим користувачам. Зареєструватися можна за адресою &9&nhttp://example.com&r'
|
||||
logged_in: '&2Ви уже ввійшли!'
|
||||
logout: '&cВи успішно вийшли'
|
||||
same_nick: '&fТакий гравець уже іграє на сервері'
|
||||
registered: '&cВи успішно зареєстровані!'
|
||||
pass_len: '&fВиш пароля знадто довгий, бо занадто короткий'
|
||||
reload: '&fКонфiгурацiя i база даних успiшно перезапущенi.'
|
||||
timeout: '&fЧас входу вийшов'
|
||||
usage_changepassword: '&fВикористовуйте: /changepassword СтарийПароль НовийПароль'
|
||||
name_len: '&cВаш логін занадто довгий, або занадто короткий'
|
||||
regex: '&cВаш логін містить заборонені символи. Доступні символи: REG_EX'
|
||||
add_email: '&cБудь ласка додайте свою електронну скриньку: /email add ВашEmail ВашEmail'
|
||||
bad_database_email: '[AuthMe] Команда /email доступна лише при роботі з MySQL, або SQLite, зверніться до адміністратора.'
|
||||
recovery_email: '&cЗабули пароль? Введіть /email recovery ВашПароль'
|
||||
usage_captcha: '&cБудь ласка введіть капчу: /captcha СимволиЗверху'
|
||||
wrong_captcha: '&cНевірне значення капчи: /captcha СимволиЗверху'
|
||||
valid_captcha: '&cКапча введена вірно!'
|
||||
kick_forvip: '&cVIP зайшов на переповнений сервер!'
|
||||
kick_fullserver: '&cНажаль, сервер переповнений!'
|
||||
usage_email_add: '&fВикористовуйте: /email add ВашEmail ВашEmail'
|
||||
usage_email_change: '&fВикористовуйте: /email change СтарийEmail НовийEmail'
|
||||
usage_email_recovery: '&fВикористовуйте: /email recovery Email'
|
||||
new_email_invalid: '[AuthMe] Новий Email недійсний!'
|
||||
old_email_invalid: '[AuthMe] Старий Email недійсний!'
|
||||
email_invalid: '[AuthMe] Невірний Email'
|
||||
email_added: '[AuthMe] &2Email додано!'
|
||||
email_confirm: '[AuthMe] Підтвердіть ваш Email!'
|
||||
email_changed: '[AuthMe] &2Email змінено!'
|
||||
email_send: '[AuthMe] Лист відновлення надіслано на ваш Email!'
|
||||
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'
|
59
src/main/resources/messages_zhhk.yml
Normal file
59
src/main/resources/messages_zhhk.yml
Normal file
@ -0,0 +1,59 @@
|
||||
# Translator: uSoc_lifehome (http://lifeho.me) #
|
||||
# '-- Last edit: 1387032046 UTC #
|
||||
# -------------------------------------------- #
|
||||
unknown_user: '&3[&b用戶系統&3] &f用戶資料並不存在於資料庫中 。'
|
||||
unsafe_spawn: '&3[&b用戶系統&3] &f你的登出位置不安全 , 現在將傳送你到重生點 。'
|
||||
not_logged_in: '&3[&b用戶系統&3] &c你還沒有登入 !'
|
||||
reg_voluntarily: '&3[&b用戶系統&3] &f你可以使用這個的指令來註冊 : 《 /register <密碼> <重覆密碼> 》'
|
||||
usage_log: '&3[&b用戶系統&3] &c用法 : 《 /login <密碼> 》'
|
||||
wrong_pwd: '&3[&b用戶系統&3] &c你輸入了錯誤的密碼 。'
|
||||
unregistered: '&3[&b用戶系統&3] &c你已成功取消會員註冊記錄 。'
|
||||
reg_disabled: '&3[&b用戶系統&3] &c本伺服器已停止新玩家註冊 。'
|
||||
valid_session: '&3[&b用戶系統&3] &b嗨 ! 我記得你 , 歡迎回來 ~'
|
||||
login: '&3[&b用戶系統&3] &c你成功的登入了 。'
|
||||
vb_nonActiv: '&3[&b用戶系統&3] &f你的帳戶還沒有經過電郵驗證 !'
|
||||
user_regged: '&3[&b用戶系統&3] &c此用戶名已經註冊過了 。'
|
||||
usage_reg: '&3[&b用戶系統&3] &c用法 : 《 /register <密碼> <重覆密碼> 》'
|
||||
max_reg: '&3[&b用戶系統&3] &f你的IP地址已達到註冊數上限 。'
|
||||
no_perm: '&3[&b用戶系統&3] &b你可以到 CraftingHK 玩家百科中查看說明文件。'
|
||||
error: '&3[&b用戶系統&3] &f發生錯誤 , 請與管理員聯絡 。'
|
||||
login_msg: '&3[&b用戶系統&3] &c請使用這個指令來登入 : 《 /login <密碼> 》'
|
||||
reg_msg: '&3[&b用戶系統&3] &c請使用這個的指令來註冊 : 《 /register <密碼> <重覆密碼> 》'
|
||||
reg_email_msg: '&3[&b用戶系統&3] &c請使用這個的指令來註冊 : 《 /register <電郵> <重覆電郵> 》'
|
||||
usage_unreg: '&3[&b用戶系統&3] &c用法 : 《 /unregister <密碼> 》'
|
||||
pwd_changed: '&3[&b用戶系統&3] &c你成功的更換了你的密碼 !'
|
||||
user_unknown: '&3[&b用戶系統&3] &c此用戶名沒有已登記資料 。'
|
||||
password_error: '&3[&b用戶系統&3] &f密碼不符合 。'
|
||||
unvalid_session: '&3[&b用戶系統&3] &f登入階段資料已損壞 , 請等待登入階段結束 。'
|
||||
reg_only: '&3[&b用戶系統&3] &f限已註冊會員 , 請先到 https://craftinghk.com/mcauth 註冊 。'
|
||||
logged_in: '&3[&b用戶系統&3] &c你已經登入過了 。'
|
||||
logout: '&3[&b用戶系統&3] &b你成功的登出了 。'
|
||||
same_nick: '&3[&b用戶系統&3] &f同名玩家已在遊玩 。'
|
||||
registered: '&3[&b用戶系統&3] &b你成功的註冊了 。'
|
||||
pass_len: '&3[&b用戶系統&3] &f你的密碼並不符合規定長度 。'
|
||||
reload: '&3[&b用戶系統&3] &b登入系統設定及資料庫重新載入完畢 。'
|
||||
timeout: '&3[&b用戶系統&3] &f登入逾時 。'
|
||||
usage_changepassword: '&3[&b用戶系統&3] &f用法 : 《 /changepassword <舊密碼> <新密碼> 》'
|
||||
name_len: '&3[&b用戶系統&3] &c你的用戶名不符合規定長度 。'
|
||||
regex: '&3[&b用戶系統&3] &c你的用戶名含有不容許之字符。以下為准許之字母 : REG_EX'
|
||||
add_email: '&3[&b用戶系統&3] &b請為你的帳戶立即添加電郵地址 : 《 /email add <電郵地址> <重覆電郵地址> 》'
|
||||
bad_database_email: '&3[&b用戶系統&3] 此指令只適用於使用MySQL或SQLite之伺服器。'
|
||||
recovery_email: '&3[&b用戶系統&3] &c忘記密碼 ? 請使用這個的指令來更新密碼 : 《 /email recovery <電郵地址> 》'
|
||||
usage_captcha: '&3[&b用戶系統&3] &c用法 : 《 /captcha <驗證碼> 》'
|
||||
wrong_captcha: '&3[&b用戶系統&3] &c你輸入了錯誤的驗證碼,請使用 《 /captcha <驗證碼> 》 再次輸入 。'
|
||||
valid_captcha: '&3[&b用戶系統&3] &c你所輸入的驗證碼是無效的 !'
|
||||
kick_forvip: '&c因為有VIP玩家登入了伺服器 。'
|
||||
kick_fullserver: '&c抱歉! 因為有VIP玩家登入了伺服器,所以你因為伺服器滿人而被踢出了 。'
|
||||
usage_email_add: '&3[&b用戶系統&3] &f用法 : 《 /email add <電郵> <重覆電郵> 》'
|
||||
usage_email_change: '&3[&b用戶系統&3] &f用法 : 《 /email change <舊電郵> <新電郵> 》'
|
||||
usage_email_recovery: '&3[&b用戶系統&3] &f用法 : 《 /email recovery <電郵> 》'
|
||||
new_email_invalid: '&3[&b用戶系統&3] 你所填寫的新電郵地址並不正確 。'
|
||||
old_email_invalid: '&3[&b用戶系統&3] 你所填寫的舊電郵地址並不正確 。'
|
||||
email_invalid: '&3[&b用戶系統&3] 你所填寫的電郵地址並不正確 。'
|
||||
email_added: '&3[&b用戶系統&3] 已加入你的電郵地址記錄 。'
|
||||
email_confirm: '&3[&b用戶系統&3] 請重覆輸入你的電郵地址 。'
|
||||
email_changed: '&3[&b用戶系統&3] 你的電郵地址記錄已更改 。'
|
||||
email_send: '&3[&b用戶系統&3] 忘記密碼信件已寄出,請查收 。'
|
||||
country_banned: '&3[&b用戶系統&3] 本伺服器已停止對你的國家提供遊戲服務 。'
|
||||
antibot_auto_enabled: '&3[&b用戶系統&3] 防止機械人程序已因應現時大量不尋常的連線而啟用 。'
|
||||
antibot_auto_disabled: '&3[&b用戶系統&3] 防止機械人程序檢查到不正常連接數已減少,並於 %m 分鐘後停止運作 。'
|
@ -1,58 +1,55 @@
|
||||
# Translator: uSoc_lifehome (http://lifeho.me) #
|
||||
# -------------------------------------------- #
|
||||
unknown_user: '&f用戶資料並不存在於資料庫中 。'
|
||||
unsafe_spawn: '&f你的登出位置不安全 , 現在將傳送你到重生點 。'
|
||||
not_logged_in: '&c你還沒有登入 !'
|
||||
reg_voluntarily: '&f你可以使用這個的指令來註冊 : 《 /register <密碼> <重覆密碼> 》'
|
||||
usage_log: '&c用法 : 《 /login <密碼> 》'
|
||||
wrong_pwd: '&c你輸入了錯誤的密碼 。'
|
||||
unregistered: '&c你已成功註銷會員記錄 。'
|
||||
reg_disabled: '&c註冊機制被停用 。'
|
||||
valid_session: '&b嗨 ! 我記得你 , 歡迎回來 ~'
|
||||
login: '&c你成功的登入了 。'
|
||||
vb_nonActiv: '&f你的帳戶還沒有經過電郵驗證 !'
|
||||
user_regged: '&c此用戶名已經註冊過了 。'
|
||||
usage_reg: '&c用法 : 《 /register <密碼> <重覆密碼> 》'
|
||||
max_reg: '&f你的IP地址已達到註冊數上限 。'
|
||||
no_perm: '&c你並沒有這個權限 。'
|
||||
error: '&f發生錯誤 , 請與管理員聯絡 。'
|
||||
login_msg: '&c請使用這個指令來登入 : 《 /login <密碼> 》'
|
||||
reg_msg: '&c請使用這個的指令來註冊 : 《 /register <密碼> <重覆密碼> 》'
|
||||
reg_email_msg: '&c請使用這個的指令來註冊 : 《 /register <電郵> <重覆電郵> 》'
|
||||
usage_unreg: '&c用法 : 《 /unregister <密碼> 》'
|
||||
pwd_changed: '&c你成功的更換了你的密碼 !'
|
||||
user_unknown: '&c此用戶名沒有已登記資料 。'
|
||||
password_error: '&f密碼不符合 。'
|
||||
unvalid_session: '&f登入階段資料已損壞 , 請等待登入階段結束 。'
|
||||
reg_only: '&f限已註冊會員 , 請先到 https://www.craftinghk.com/ 註冊 。'
|
||||
logged_in: '&c你已經登入過了 。'
|
||||
logout: '&b你成功的登出了 。'
|
||||
same_nick: '&f同名玩家已在遊玩 。'
|
||||
registered: '&b你成功的註冊了 。'
|
||||
pass_len: '&f你的密碼並不符合規定長度 。'
|
||||
reload: '&b登入系統設定及資料庫重新載入完畢 。'
|
||||
timeout: '&f登入逾時 。'
|
||||
usage_changepassword: '&f用法 : 《 /changepassword <舊密碼> <新密碼> 》'
|
||||
name_len: '&c你的用戶名不符合規定長度 。'
|
||||
regex: '&c你的用戶名含有不容許之字符。以下為准許之字母 : REG_EX'
|
||||
add_email: '&b請為你的帳戶立即添加電郵地址 : 《 /email add <電郵地址> <重覆電郵地址> 》'
|
||||
bad_database_email: '[AuthMe] 此指令只適用於使用MySQL或SQLite之伺服器。'
|
||||
recovery_email: '&c忘記密碼 ? 請使用這個的指令來更新密碼 : 《 /email recovery <電郵地址> 》'
|
||||
usage_captcha: '&c用法 : 《 /captcha <驗證碼> 》'
|
||||
wrong_captcha: '&c你輸入了錯誤的驗證碼,請使用 《 /captcha <驗證碼> 》 再次輸入 。'
|
||||
valid_captcha: '&c你的驗證碼是無效的 !'
|
||||
kick_forvip: '&cA 因為有VIP玩家進入了伺服器 。'
|
||||
kick_fullserver: '&c抱歉! 這個伺服器滿人了,也許你需要VIP會藉?'
|
||||
usage_email_add: '&f用法 : 《 /email add <電郵> <重覆電郵> 》'
|
||||
usage_email_change: '&f用法 : 《 /email change <舊電郵> <新電郵> 》'
|
||||
usage_email_recovery: '&f用法 : 《 /email recovery <電郵> 》'
|
||||
new_email_invalid: '你所填寫的新電郵地址並不正確。'
|
||||
old_email_invalid: '你所填寫的舊電郵地址並不正確。'
|
||||
email_invalid: '你所填寫的電郵地址並不正確。'
|
||||
email_added: '已加入你的電郵地址記錄。'
|
||||
email_confirm: '請重覆輸入你的電郵地址。'
|
||||
email_changed: '你的電郵地址記錄已更改。'
|
||||
email_send: '忘記密碼確定信件已寄出,請查收。'
|
||||
unknown_user: 使用者名稱不在資料庫內
|
||||
unsafe_spawn: 退出的位置是不安全的,你被傳送到重生點
|
||||
not_logged_in: '&c您還未登入!'
|
||||
reg_voluntarily: 您可以在本伺服器創一個屬於您的密碼 ,指令:"/register <密碼> 確認密碼"
|
||||
usage_log: '&c正確用法為:使用"/login <密碼>"來登入'
|
||||
wrong_pwd: '&c密碼錯誤!'
|
||||
unregistered: '&a此密碼尚未被註冊!'
|
||||
reg_disabled: '&c註冊被禁用'
|
||||
valid_session: '&c"會議"登入'
|
||||
login: '&a登入成功!'
|
||||
vb_nonActiv: 你的帳號沒有被繳活,請查看你的電子信箱!
|
||||
user_regged: '&c此密碼已被註冊,請重新註冊您的新密碼!'
|
||||
usage_reg: '&c正確用法為:使用"/register <密碼> <確認密碼>"來註冊你的密碼'
|
||||
max_reg: 你的密碼註冊數量已滿,無法繼續註冊!
|
||||
no_perm: '&c你沒有權限!'
|
||||
error: 發生未知錯誤,請通知管理員!
|
||||
login_msg: '&c請使用"/login <密碼>"來登入'
|
||||
reg_msg: '&c初次登入請使用"/register <密碼> <確認密碼>"來註冊!'
|
||||
usage_unreg: '&c正確用法為:使用"/unregister <密碼>"來取消現有密碼'
|
||||
pwd_changed: '&c密碼變更成功!'
|
||||
user_unknown: '&c此用戶名並未被註冊!'
|
||||
password_error: <密碼>與<錯認密碼>不相同!
|
||||
unvalid_session: Session Dataes doesnt corrispond Plaese wait the end of session
|
||||
reg_only: Registered players only! Please visit http://example.com to register
|
||||
logged_in: '&c您已經登入了!'
|
||||
logout: '&a登出成功!'
|
||||
same_nick: 與別人的密碼重複!
|
||||
registered: '&a註冊成功!'
|
||||
pass_len: 您的密碼未到達最小長度(4),或超過最大長度(20)
|
||||
reload: 伺服器已重新配置數據庫
|
||||
timeout: 登入超時了!
|
||||
usage_changepassword: 正確用法為:使用"/changepassword <舊密碼> <新密碼>"來更換密碼
|
||||
name_len: '&cYour nickname is 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 only available with MySQL and SQLite, contact an Admin'
|
||||
recovery_email: '&cForgot your password? Please use /email recovery <yourEmail>'
|
||||
usage_captcha: '&cYou need to type a captcha, please type: /captcha <theCaptcha>'
|
||||
wrong_captcha: '&cWrong Captcha, please use : /captcha THE_CAPTCHA'
|
||||
valid_captcha: '&cYour captcha is valid !'
|
||||
kick_forvip: '&cA VIP Player join the full server!'
|
||||
kick_fullserver: '&cThe server is actually full, Sorry!'
|
||||
usage_email_add: '&fUsage: /email add <email> <confirmeEmail> '
|
||||
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'
|
@ -3,7 +3,7 @@ author: Xephi59
|
||||
website: http://dev.bukkit.org/bukkit-plugins/authme-recoded/
|
||||
description: AuthMe prevents people, which aren't logged in, from doing stuff like placing blocks, moving, typing commands or seeing the inventory of the current player.
|
||||
main: fr.xephi.authme.AuthMe
|
||||
version: 3.1.2-DEV-1
|
||||
version: 3.1.2-DEV-3
|
||||
softdepend: [Vault, ChestShop, Spout, Multiverse-Core, Notifications, Citizens, CombatTag, Essentials, EssentialsSpawn]
|
||||
commands:
|
||||
register:
|
||||
|
Loading…
Reference in New Issue
Block a user