recycledConnections; // list of inactive PooledConnections
+private int activeConnections; // number of active (open) connections of this pool
+private boolean isDisposed; // true if this connection pool has been disposed
+private boolean doPurgeConnection; // flag to purge the connection currently beeing closed instead of recycling it
+private PooledConnection connectionInTransition; // a PooledConnection which is currently within a PooledConnection.getConnection() call, or null
/**
* Thrown in {@link #getConnection()} or {@link #getValidConnection()} when no free connection becomes
@@ -66,7 +70,7 @@ public static class TimeoutException extends RuntimeException {
* the maximum number of connections.
*/
public MiniConnectionPoolManager (ConnectionPoolDataSource dataSource, int maxConnections) {
- this(dataSource, maxConnections, 100); }
+ this(dataSource, maxConnections, 60); }
/**
* Constructs a MiniConnectionPoolManager object.
@@ -146,15 +150,23 @@ private Connection getConnection2 (long timeoutMs) throws SQLException {
private synchronized Connection getConnection3() throws SQLException {
if (isDisposed) {
- throw new IllegalStateException("Connection pool has been disposed."); } // test again with lock
+ throw new IllegalStateException("Connection pool has been disposed."); }
PooledConnection pconn;
if (!recycledConnections.isEmpty()) {
pconn = recycledConnections.remove(); }
else {
pconn = dataSource.getPooledConnection();
pconn.addConnectionEventListener(poolConnectionEventListener); }
- Connection conn = pconn.getConnection();
- activeConnections++;
+ Connection conn;
+ try {
+ // The JDBC driver may call ConnectionEventListener.connectionErrorOccurred()
+ // from within PooledConnection.getConnection(). To detect this within
+ // disposeConnection(), we temporarily set connectionInTransition.
+ connectionInTransition = pconn;
+ activeConnections++;
+ conn = pconn.getConnection(); }
+ finally {
+ connectionInTransition = null; }
assertInnerState();
return conn; }
@@ -171,7 +183,6 @@ private synchronized Connection getConnection3() throws SQLException {
* This method is slower than {@link #getConnection()} because the JDBC
* driver has to send an extra command to the database server to test the connection.
*
-*
*
This method requires Java 1.6 or newer.
*
* @throws TimeoutException
@@ -189,17 +200,12 @@ public Connection getValidConnection() {
if (triesWithoutDelay <= 0) {
triesWithoutDelay = 0;
try {
- Thread.sleep(250);
- } catch (InterruptedException e) {
- throw new RuntimeException("Interrupted while waiting for a valid database connection.", e);
- }
- }
+ Thread.sleep(250); }
+ catch (InterruptedException e) {
+ throw new RuntimeException("Interrupted while waiting for a valid database connection.", e); }}
time = System.currentTimeMillis();
if (time >= timeoutTime) {
- throw new TimeoutException("Timeout while waiting for a valid database connection.");
- }
- }
-}
+ throw new TimeoutException("Timeout while waiting for a valid database connection."); }}}
private Connection getValidConnection2 (long time, long timeoutTime) {
long rtime = Math.max(1, timeoutTime - time);
@@ -241,7 +247,7 @@ private synchronized void recycleConnection (PooledConnection pconn) {
disposeConnection(pconn);
return; }
if (activeConnections <= 0) {
- throw new AssertionError(); }
+ throw new AssertionError("AuthMeDatabaseError"); }
activeConnections--;
semaphore.release();
recycledConnections.add(pconn);
@@ -249,11 +255,12 @@ private synchronized void recycleConnection (PooledConnection pconn) {
private synchronized void disposeConnection (PooledConnection pconn) {
pconn.removeConnectionEventListener(poolConnectionEventListener);
- if (!recycledConnections.remove(pconn)) {
- // If the PooledConnection is not in the recycledConnections list,
+ if (!recycledConnections.remove(pconn) && pconn != connectionInTransition) {
+ // If the PooledConnection is not in the recycledConnections list
+ // and is not currently within a PooledConnection.getConnection() call,
// we assume that the connection was active.
if (activeConnections <= 0) {
- throw new AssertionError(); }
+ throw new AssertionError("AuthMeDatabaseError"); }
activeConnections--;
semaphore.release(); }
closeConnectionAndIgnoreException(pconn);
@@ -274,13 +281,13 @@ private void log (String msg) {
logWriter.println(s); }}
catch (Exception e) {}}
-private void assertInnerState() {
+private synchronized void assertInnerState() {
if (activeConnections < 0) {
- throw new AssertionError(); }
+ throw new AssertionError("AuthMeDatabaseError"); }
if (activeConnections + recycledConnections.size() > maxConnections) {
- throw new AssertionError(); }
+ throw new AssertionError("AuthMeDatabaseError"); }
if (activeConnections + semaphore.availablePermits() > maxConnections) {
- throw new AssertionError(); }}
+ throw new AssertionError("AuthMeDatabaseError"); }}
private class PoolConnectionEventListener implements ConnectionEventListener {
public void connectionClosed (ConnectionEvent event) {
diff --git a/src/main/java/uk/org/whoami/authme/datasource/MySQLDataSource.java b/src/main/java/uk/org/whoami/authme/datasource/MySQLDataSource.java
index 4e89bb2f..cd07d85f 100644
--- a/src/main/java/uk/org/whoami/authme/datasource/MySQLDataSource.java
+++ b/src/main/java/uk/org/whoami/authme/datasource/MySQLDataSource.java
@@ -26,6 +26,7 @@ import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;
+import uk.org.whoami.authme.AuthMe;
import uk.org.whoami.authme.ConsoleLogger;
import uk.org.whoami.authme.cache.auth.PlayerAuth;
import uk.org.whoami.authme.datasource.MiniConnectionPoolManager.TimeoutException;
@@ -97,7 +98,7 @@ public class MySQLDataSource implements DataSource {
Statement st = null;
ResultSet rs = null;
try {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
st = con.createStatement();
st.executeUpdate("CREATE TABLE IF NOT EXISTS " + tableName + " ("
+ columnID + " INTEGER AUTO_INCREMENT,"
@@ -157,7 +158,7 @@ public class MySQLDataSource implements DataSource {
PreparedStatement pst = null;
ResultSet rs = null;
try {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
pst = con.prepareStatement("SELECT * FROM " + tableName + " WHERE "
+ columnName + "=?;");
@@ -183,7 +184,7 @@ public class MySQLDataSource implements DataSource {
PreparedStatement pst = null;
ResultSet rs = null;
try {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
pst = con.prepareStatement("SELECT * FROM " + tableName + " WHERE "
+ columnName + "=?;");
pst.setString(1, user);
@@ -221,7 +222,7 @@ public class MySQLDataSource implements DataSource {
Connection con = null;
PreparedStatement pst = null;
try {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
if ((columnSalt.isEmpty() || columnSalt == null) && (auth.getSalt().isEmpty() || auth.getSalt() == null)) {
pst = con.prepareStatement("INSERT INTO " + tableName + "(" + columnName + "," + columnPassword + "," + columnIp + "," + columnLastLogin + ") VALUES (?,?,?,?);");
pst.setString(1, auth.getNickname());
@@ -264,7 +265,7 @@ public class MySQLDataSource implements DataSource {
Connection con = null;
PreparedStatement pst = null;
try {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
pst = con.prepareStatement("UPDATE " + tableName + " SET " + columnPassword + "=? WHERE " + columnName + "=?;");
pst.setString(1, auth.getHash());
pst.setString(2, auth.getNickname());
@@ -287,7 +288,7 @@ public class MySQLDataSource implements DataSource {
Connection con = null;
PreparedStatement pst = null;
try {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
pst = con.prepareStatement("UPDATE " + tableName + " SET " + columnIp + "=?, " + columnLastLogin + "=? WHERE " + columnName + "=?;");
pst.setString(1, auth.getIp());
pst.setLong(2, auth.getLastLogin());
@@ -311,7 +312,7 @@ public class MySQLDataSource implements DataSource {
Connection con = null;
PreparedStatement pst = null;
try {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
pst = con.prepareStatement("DELETE FROM " + tableName + " WHERE " + columnLastLogin + ";");
pst.setLong(1, until);
return pst.executeUpdate();
@@ -332,7 +333,7 @@ public class MySQLDataSource implements DataSource {
Connection con = null;
PreparedStatement pst = null;
try {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
pst = con.prepareStatement("DELETE FROM " + tableName + " WHERE " + columnName + "=?;");
pst.setString(1, user);
pst.executeUpdate();
@@ -354,7 +355,7 @@ public class MySQLDataSource implements DataSource {
Connection con = null;
PreparedStatement pst = null;
try {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
pst = con.prepareStatement("UPDATE " + tableName + " SET "+ lastlocX + " =?, "+ lastlocY +"=?, "+ lastlocZ +"=?, " + lastlocWorld + "=? WHERE " + columnName + "=?;");
pst.setLong(1, auth.getQuitLocX());
pst.setLong(2, auth.getQuitLocY());
@@ -382,7 +383,7 @@ public class MySQLDataSource implements DataSource {
ResultSet rs = null;
int countIp=0;
try {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
pst = con.prepareStatement("SELECT * FROM " + tableName + " WHERE "
+ columnIp + "=?;");
pst.setString(1, ip);
@@ -409,7 +410,7 @@ public class MySQLDataSource implements DataSource {
Connection con = null;
PreparedStatement pst = null;
try {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
pst = con.prepareStatement("UPDATE " + tableName + " SET "+ columnEmail + " =? WHERE " + columnName + "=?;");
pst.setString(1, auth.getEmail());
pst.setString(2, auth.getNickname());
@@ -435,7 +436,7 @@ public class MySQLDataSource implements DataSource {
Connection con = null;
PreparedStatement pst = null;
try {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
pst = con.prepareStatement("UPDATE " + tableName + " SET "+ columnSalt + " =? WHERE " + columnName + "=?;");
pst.setString(1, auth.getSalt());
pst.setString(2, auth.getNickname());
@@ -503,7 +504,7 @@ public class MySQLDataSource implements DataSource {
ResultSet rs = null;
List countIp = new ArrayList();
try {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
pst = con.prepareStatement("SELECT * FROM " + tableName + " WHERE "
+ columnIp + "=?;");
pst.setString(1, auth.getIp());
@@ -532,7 +533,7 @@ public class MySQLDataSource implements DataSource {
ResultSet rs = null;
List countIp = new ArrayList();
try {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
pst = con.prepareStatement("SELECT * FROM " + tableName + " WHERE "
+ columnIp + "=?;");
pst.setString(1, ip);
@@ -561,7 +562,7 @@ public class MySQLDataSource implements DataSource {
ResultSet rs = null;
List countEmail = new ArrayList();
try {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
pst = con.prepareStatement("SELECT * FROM " + tableName + " WHERE "
+ columnEmail + "=?;");
pst.setString(1, email);
@@ -589,7 +590,7 @@ public class MySQLDataSource implements DataSource {
PreparedStatement pst = null;
try {
for (String name : banned) {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
pst = con.prepareStatement("DELETE FROM " + tableName + " WHERE " + columnName + "=?;");
pst.setString(1, name);
pst.executeUpdate();
@@ -602,4 +603,55 @@ public class MySQLDataSource implements DataSource {
}
}
+ private synchronized Connection makeSureConnectionIsReady() {
+ Connection con = null;
+ try {
+ con = conPool.getValidConnection();
+ } catch (Exception te) {
+ try {
+ con = null;
+ reconnect();
+ } catch (Exception e) {
+ ConsoleLogger.showError(e.getMessage());
+ if (Settings.isStopEnabled) {
+ ConsoleLogger.showError("Can't reconnect to MySQL database... Please check your MySQL informations ! SHUTDOWN...");
+ AuthMe.getInstance().getServer().shutdown();
+ }
+ if (!Settings.isStopEnabled)
+ AuthMe.getInstance().getServer().getPluginManager().disablePlugin(AuthMe.getInstance());
+ }
+ } catch (AssertionError ae) {
+ // Make sure assertionerror is caused by the connectionpoolmanager, else re-throw it
+ if (!ae.getMessage().equalsIgnoreCase("AuthMeDatabaseError"))
+ throw new AssertionError(ae.getMessage());
+ try {
+ con = null;
+ reconnect();
+ } catch (Exception e) {
+ ConsoleLogger.showError(e.getMessage());
+ if (Settings.isStopEnabled) {
+ ConsoleLogger.showError("Can't reconnect to MySQL database... Please check your MySQL informations ! SHUTDOWN...");
+ AuthMe.getInstance().getServer().shutdown();
+ }
+ if (!Settings.isStopEnabled)
+ AuthMe.getInstance().getServer().getPluginManager().disablePlugin(AuthMe.getInstance());
+ }
+ }
+ if (con == null)
+ con = conPool.getValidConnection();
+ return con;
+ }
+
+ private synchronized void reconnect() throws ClassNotFoundException, SQLException, TimeoutException {
+ conPool.dispose();
+ Class.forName("com.mysql.jdbc.Driver");
+ MysqlConnectionPoolDataSource dataSource = new MysqlConnectionPoolDataSource();
+ dataSource.setDatabaseName(database);
+ dataSource.setServerName(host);
+ dataSource.setPort(Integer.parseInt(port));
+ dataSource.setUser(username);
+ dataSource.setPassword(password);
+ conPool = new MiniConnectionPoolManager(dataSource, 10);
+ ConsoleLogger.info("ConnectionPool was unavailable... Reconnected!");
+ }
}
diff --git a/src/main/java/uk/org/whoami/authme/datasource/SqliteDataSource.java b/src/main/java/uk/org/whoami/authme/datasource/SqliteDataSource.java
index afc5f842..074edc72 100644
--- a/src/main/java/uk/org/whoami/authme/datasource/SqliteDataSource.java
+++ b/src/main/java/uk/org/whoami/authme/datasource/SqliteDataSource.java
@@ -57,7 +57,6 @@ public class SqliteDataSource implements DataSource {
Class.forName("org.sqlite.JDBC");
ConsoleLogger.info("SQLite driver loaded");
this.con = DriverManager.getConnection("jdbc:sqlite:plugins/AuthMe/"+database+".db");
-
}
private synchronized void setup() throws SQLException {
diff --git a/src/main/java/uk/org/whoami/authme/listener/AuthMeEntityListener.java b/src/main/java/uk/org/whoami/authme/listener/AuthMeEntityListener.java
index 3ab16176..fcf8fbf0 100644
--- a/src/main/java/uk/org/whoami/authme/listener/AuthMeEntityListener.java
+++ b/src/main/java/uk/org/whoami/authme/listener/AuthMeEntityListener.java
@@ -83,8 +83,8 @@ public class AuthMeEntityListener implements Listener{
if (event.isCancelled()) {
return;
}
-
- Entity entity = event.getEntity();
+ if (event.getTarget() == null) return;
+ Entity entity = event.getTarget();
if (!(entity instanceof Player)) {
return;
}
@@ -101,7 +101,7 @@ public class AuthMeEntityListener implements Listener{
return;
}
}
-
+ event.setTarget(null);
event.setCancelled(true);
}
diff --git a/src/main/java/uk/org/whoami/authme/listener/AuthMePlayerListener.java b/src/main/java/uk/org/whoami/authme/listener/AuthMePlayerListener.java
index 4bcbe14e..27bc0be9 100644
--- a/src/main/java/uk/org/whoami/authme/listener/AuthMePlayerListener.java
+++ b/src/main/java/uk/org/whoami/authme/listener/AuthMePlayerListener.java
@@ -94,60 +94,52 @@ public class AuthMePlayerListener implements Listener {
@EventHandler(priority = EventPriority.LOWEST)
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) {
- if (event.isCancelled() || event.getPlayer() == null) {
+ if (event.isCancelled() || event.getPlayer() == null)
return;
- }
Player player = event.getPlayer();
String name = player.getName().toLowerCase();
- if (Utils.getInstance().isUnrestricted(player)) {
+ if (Utils.getInstance().isUnrestricted(player))
return;
- }
- if (PlayerCache.getInstance().isAuthenticated(name)) {
+ if (PlayerCache.getInstance().isAuthenticated(name))
return;
- }
- if (!data.isAuthAvailable(name)) {
- if (!Settings.isForcedRegistrationEnabled) {
+ if (!data.isAuthAvailable(name))
+ if (!Settings.isForcedRegistrationEnabled)
return;
- }
- }
String msg = event.getMessage();
//WorldEdit GUI Shit
- if (msg.equalsIgnoreCase("/worldedit cui")) {
+ if (msg.equalsIgnoreCase("/worldedit cui"))
return;
- }
String cmd = msg.split(" ")[0];
- if (cmd.equalsIgnoreCase("/login") || cmd.equalsIgnoreCase("/register") || cmd.equalsIgnoreCase("/passpartu") || cmd.equalsIgnoreCase("/l") || cmd.equalsIgnoreCase("/reg") || cmd.equalsIgnoreCase("/email") || cmd.equalsIgnoreCase("/captcha")) {
+ if (cmd.equalsIgnoreCase("/login") || cmd.equalsIgnoreCase("/register") || cmd.equalsIgnoreCase("/passpartu") || cmd.equalsIgnoreCase("/l") || cmd.equalsIgnoreCase("/reg") || cmd.equalsIgnoreCase("/email") || cmd.equalsIgnoreCase("/captcha"))
return;
- }
- if (Settings.allowCommands.contains(cmd)) {
+ if (Settings.useEssentialsMotd && cmd.equalsIgnoreCase("/motd"))
return;
- }
+ if (Settings.allowCommands.contains(cmd))
+ return;
+
event.setMessage("/notloggedin");
event.setCancelled(true);
}
@EventHandler( priority = EventPriority.NORMAL)
public void onPlayerNormalChat(AsyncPlayerChatEvent event) {
- if (event.isCancelled() || event.getPlayer() == null) {
+ if (event.isCancelled() || event.getPlayer() == null)
return;
- }
final Player player = event.getPlayer();
final String name = player.getName().toLowerCase();
- if (Utils.getInstance().isUnrestricted(player)) {
+ if (Utils.getInstance().isUnrestricted(player))
return;
- }
- if (PlayerCache.getInstance().isAuthenticated(name)) {
+ if (PlayerCache.getInstance().isAuthenticated(name))
return;
- }
String cmd = event.getMessage().split(" ")[0];
@@ -266,7 +258,6 @@ public class AuthMePlayerListener implements Listener {
String cmd = event.getMessage().split(" ")[0];
if (!Settings.isChatAllowed && !(Settings.allowCommands.contains(cmd))) {
- //System.out.println("debug chat: chat isnt allowed");
event.setCancelled(true);
return;
}
@@ -702,8 +693,7 @@ public class AuthMePlayerListener implements Listener {
plugin.getServer().banIP(ip);
return;
}
-
- if (data.isAuthAvailable(name)) {
+ if (data.isAuthAvailable(name)) {
if (Settings.isSessionsEnabled) {
PlayerAuth auth = data.getAuth(name);
long timeout = Settings.getSessionTimeout * 60000;
@@ -725,6 +715,12 @@ public class AuthMePlayerListener implements Listener {
player.kickPlayer(m._("unvalid_session"));
return;
} else if (auth.getNickname().equalsIgnoreCase(name)){
+ if (Settings.isForceSurvivalModeEnabled && !Settings.forceOnlyAfterLogin)
+ sched.scheduleSyncDelayedTask(plugin, new Runnable() {
+ public void run() {
+ e.getPlayer().setGameMode(GameMode.SURVIVAL);
+ }
+ });
//Player change his IP between 2 relog-in
PlayerCache.getInstance().removePlayer(name);
LimboCache.getInstance().addLimboPlayer(player , utils.removeAll(player));
@@ -739,12 +735,16 @@ public class AuthMePlayerListener implements Listener {
PlayerCache.getInstance().removePlayer(name);
LimboCache.getInstance().addLimboPlayer(player , utils.removeAll(player));
}
- }
+ }
// isent in session or session was ended correctly
- LimboCache.getInstance().addLimboPlayer(player);
+ if (Settings.isForceSurvivalModeEnabled && !Settings.forceOnlyAfterLogin)
+ e.getPlayer().setGameMode(GameMode.SURVIVAL);
+ LimboCache.getInstance().updateLimboPlayer(player);
DataFileCache dataFile = new DataFileCache(LimboCache.getInstance().getLimboPlayer(name).getInventory(),LimboCache.getInstance().getLimboPlayer(name).getArmour());
- playerBackup.createCache(name, dataFile, LimboCache.getInstance().getLimboPlayer(name).getGroup(),LimboCache.getInstance().getLimboPlayer(name).getOperator());
- } else {
+ playerBackup.createCache(name, dataFile, LimboCache.getInstance().getLimboPlayer(name).getGroup(),LimboCache.getInstance().getLimboPlayer(name).getOperator(),LimboCache.getInstance().getLimboPlayer(name).isFlying());
+ } else {
+ if (Settings.isForceSurvivalModeEnabled && !Settings.forceOnlyAfterLogin)
+ e.getPlayer().setGameMode(GameMode.SURVIVAL);
if(!Settings.unRegisteredGroup.isEmpty()){
utils.setGroup(player, Utils.groupType.UNREGISTERED);
}
@@ -752,6 +752,7 @@ public class AuthMePlayerListener implements Listener {
return;
}
}
+
if(Settings.protectInventoryBeforeLogInEnabled) {
try {
LimboPlayer limbo = LimboCache.getInstance().getLimboPlayer(player.getName().toLowerCase());
@@ -774,6 +775,7 @@ public class AuthMePlayerListener implements Listener {
player.teleport(tpEvent.getTo());
}
}
+ placePlayerSafely(player, spawnLoc);
String msg = "";
if(Settings.emailRegistration) {
msg = data.isAuthAvailable(name) ? m._("login_msg") : m._("reg_email_msg");
@@ -792,22 +794,23 @@ public class AuthMePlayerListener implements Listener {
LimboCache.getInstance().addLimboPlayer(player);
if(player.isOp())
player.setOp(false);
+ player.setAllowFlight(true);
+ player.setFlying(true);
BukkitTask msgT = sched.runTask(plugin, new MessageTask(plugin, name, msg, msgInterval));
LimboCache.getInstance().getLimboPlayer(name).setMessageTaskId(msgT.getTaskId());
- if (Settings.isForceSurvivalModeEnabled)
- sched.scheduleSyncDelayedTask(plugin, new Runnable() {
- public void run() {
- e.getPlayer().setGameMode(GameMode.SURVIVAL);
- }
- });
- placePlayerSafely(player, spawnLoc);
+ player.setNoDamageTicks(Settings.getRegistrationTimeout * 20);
+ if (Settings.useEssentialsMotd)
+ player.performCommand("motd");
}
private void placePlayerSafely(Player player, Location spawnLoc) {
+ if (Settings.isTeleportToSpawnEnabled || (Settings.isForceSpawnLocOnJoinEnabled && Settings.getForcedWorlds.contains(player.getWorld().getName())))
+ return;
Block b = player.getLocation().getBlock();
- if (b.getType() == Material.PORTAL || b.getType() == Material.ENDER_PORTAL) {
+ if (b.getType() == Material.PORTAL || b.getType() == Material.ENDER_PORTAL || b.getType() == Material.LAVA || b.getType() == Material.STATIONARY_LAVA) {
player.sendMessage(m._("unsafe_spawn"));
player.teleport(spawnLoc);
+ return;
}
}
@@ -856,6 +859,9 @@ public class AuthMePlayerListener implements Listener {
}
utils.addNormal(player, limbo.getGroup());
player.setOp(limbo.getOperator());
+ if (player.getGameMode() != GameMode.CREATIVE)
+ player.setAllowFlight(limbo.isFlying());
+ player.setFlying(limbo.isFlying());
this.plugin.getServer().getScheduler().cancelTask(limbo.getTimeoutTaskId());
LimboCache.getInstance().deleteLimboPlayer(name);
if(playerBackup.doesCacheExist(name)) {
@@ -900,7 +906,7 @@ public class AuthMePlayerListener implements Listener {
String name = player.getName().toLowerCase();
if ((PlayerCache.getInstance().isAuthenticated(name)) && (!player.isDead()) &&
- (Settings.isSaveQuitLocationEnabled.booleanValue()) && data.isAuthAvailable(name)) {
+ (Settings.isSaveQuitLocationEnabled) && data.isAuthAvailable(name)) {
final PlayerAuth auth = new PlayerAuth(event.getPlayer().getName().toLowerCase(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(),loc.getWorld().getName());
try {
if (data instanceof Thread) {
@@ -919,7 +925,7 @@ public class AuthMePlayerListener implements Listener {
if (LimboCache.getInstance().hasLimboPlayer(name))
{
LimboPlayer limbo = LimboCache.getInstance().getLimboPlayer(name);
- if (Settings.protectInventoryBeforeLogInEnabled.booleanValue()) {
+ if (Settings.protectInventoryBeforeLogInEnabled) {
try {
RestoreInventoryEvent ev = new RestoreInventoryEvent(player, limbo.getInventory(), limbo.getArmour());
plugin.getServer().getPluginManager().callEvent(ev);
@@ -943,7 +949,9 @@ public class AuthMePlayerListener implements Listener {
}
this.utils.addNormal(player, limbo.getGroup());
player.setOp(limbo.getOperator());
-
+ if (player.getGameMode() != GameMode.CREATIVE)
+ player.setAllowFlight(limbo.isFlying());
+ player.setFlying(limbo.isFlying());
this.plugin.getServer().getScheduler().cancelTask(limbo.getTimeoutTaskId());
LimboCache.getInstance().deleteLimboPlayer(name);
if (this.playerBackup.doesCacheExist(name)) {
@@ -1190,19 +1198,6 @@ public class AuthMePlayerListener implements Listener {
}
if (Spawn.getInstance().getLocation() != null && Spawn.getInstance().getLocation().getWorld().equals(player.getWorld()))
spawn = Spawn.getInstance().getLocation();
- final PlayerAuth auth = new PlayerAuth(event.getPlayer().getName().toLowerCase(), spawn.getBlockX(), spawn.getBlockY(), spawn.getBlockZ(),spawn.getWorld().getName());
- try {
- if (data instanceof Thread) {
- data.updateQuitLoc(auth);
- } else {
- Bukkit.getScheduler().runTaskAsynchronously(plugin, new Runnable(){
- @Override
- public void run() {
- data.updateQuitLoc(auth);
- }
- });
- }
- } catch (NullPointerException npe) { }
event.setRespawnLocation(spawn);
}
diff --git a/src/main/java/uk/org/whoami/authme/security/PasswordSecurity.java b/src/main/java/uk/org/whoami/authme/security/PasswordSecurity.java
index f58d74c3..230d5bfc 100644
--- a/src/main/java/uk/org/whoami/authme/security/PasswordSecurity.java
+++ b/src/main/java/uk/org/whoami/authme/security/PasswordSecurity.java
@@ -28,6 +28,7 @@ import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import uk.org.whoami.authme.AuthMe;
+import uk.org.whoami.authme.security.pbkdf2.BinTools;
import uk.org.whoami.authme.security.pbkdf2.PBKDF2Engine;
import uk.org.whoami.authme.security.pbkdf2.PBKDF2Parameters;
import uk.org.whoami.authme.settings.Settings;
@@ -110,9 +111,10 @@ public class PasswordSecurity {
private static String getPBKDF2(String password, String salt) throws NoSuchAlgorithmException {
String result = "pbkdf2_sha256$10000$"+salt+"$";
- PBKDF2Parameters params = new PBKDF2Parameters("SHA-256", "UTF-8", salt.getBytes(), 10000);
+ PBKDF2Parameters params = new PBKDF2Parameters("HmacSHA256", "ASCII", BinTools.hex2bin(salt), 10000);
PBKDF2Engine engine = new PBKDF2Engine(params);
- return result + engine.deriveKey(password,57).toString();
+
+ return result + BinTools.bin2hex(engine.deriveKey(password,64));
}
private static String createSalt(int length) throws NoSuchAlgorithmException {
@@ -290,7 +292,7 @@ public class PasswordSecurity {
String[] line = hash.split("\\$");
String salt = line[2];
String derivedKey = line[3];
- PBKDF2Parameters params = new PBKDF2Parameters("SHA-256", "UTF-8", salt.getBytes(), 10000, derivedKey.getBytes());
+ PBKDF2Parameters params = new PBKDF2Parameters("HmacSHA256", "ASCII", BinTools.hex2bin(salt), 10000, BinTools.hex2bin(derivedKey));
PBKDF2Engine engine = new PBKDF2Engine(params);
return engine.verifyKey(password);
}
diff --git a/src/main/java/uk/org/whoami/authme/settings/Settings.java b/src/main/java/uk/org/whoami/authme/settings/Settings.java
index ba1e2323..7e19748e 100644
--- a/src/main/java/uk/org/whoami/authme/settings/Settings.java
+++ b/src/main/java/uk/org/whoami/authme/settings/Settings.java
@@ -60,7 +60,7 @@ public final class Settings extends YamlConfiguration {
getEnablePasswordVerifier, protectInventoryBeforeLogInEnabled, isBackupActivated, isBackupOnStart,
isBackupOnStop, enablePasspartu, isStopEnabled, reloadSupport, rakamakUseIp, noConsoleSpam, removePassword, displayOtherAccounts,
useCaptcha, emailRegistration, multiverse, notifications, chestshop, bungee, banUnsafeIp, doubleEmailCheck, sessionExpireOnIpChange,
- disableSocialSpy, useMultiThreading;
+ disableSocialSpy, useMultiThreading, forceOnlyAfterLogin, useEssentialsMotd;
public static String getNickRegex, getUnloggedinGroup, getMySQLHost, getMySQLPort,
getMySQLUsername, getMySQLPassword, getMySQLDatabase, getMySQLTablename,
@@ -210,6 +210,8 @@ public void loadConfigOptions() {
disableSocialSpy = configFile.getBoolean("Hooks.disableSocialSpy", true);
useMultiThreading = configFile.getBoolean("Performances.useMultiThreading", false);
bCryptLog2Rounds = configFile.getInt("ExternalBoardOptions.bCryptLog2Round", 10);
+ forceOnlyAfterLogin = configFile.getBoolean("settings.GameMode.ForceOnlyAfterLogin", false);
+ useEssentialsMotd = configFile.getBoolean("Hooks.useEssentialsMotd", false);
saveDefaults();
}
@@ -333,7 +335,9 @@ public static void reloadConfigOptions(YamlConfiguration newConfig) {
disableSocialSpy = configFile.getBoolean("Hooks.disableSocialSpy", true);
useMultiThreading = configFile.getBoolean("Performances.useMultiThreading", false);
bCryptLog2Rounds = configFile.getInt("ExternalBoardOptions.bCryptLog2Round", 10);
- }
+ forceOnlyAfterLogin = configFile.getBoolean("settings.GameMode.ForceOnlyAfterLogin", false);
+ useEssentialsMotd = configFile.getBoolean("Hooks.useEssentialsMotd", false);
+}
public void mergeConfig() {
if (contains("settings.restrictions.allowedPluginTeleportHandler"))
@@ -416,6 +420,10 @@ public void mergeConfig() {
set("ExternalBoardOptions.bCryptLog2Round", 10);
if(!contains("DataSource.mySQLlastlocWorld"))
set("DataSource.mySQLlastlocWorld", "world");
+ if(!contains("settings.GameMode.ForceOnlyAfterLogin"))
+ set("settings.GameMode.ForceOnlyAfterLogin", false);
+ if(!contains("Hooks.useEssentialsMotd"))
+ set("Hooks.useEssentialsMotd", false);
plugin.getLogger().info("Merge new Config Options if needed..");
plugin.saveConfig();
diff --git a/src/main/java/uk/org/whoami/authme/threads/MySQLThread.java b/src/main/java/uk/org/whoami/authme/threads/MySQLThread.java
index c1bdf497..6d08e093 100644
--- a/src/main/java/uk/org/whoami/authme/threads/MySQLThread.java
+++ b/src/main/java/uk/org/whoami/authme/threads/MySQLThread.java
@@ -113,7 +113,7 @@ public class MySQLThread extends Thread implements DataSource {
Statement st = null;
ResultSet rs = null;
try {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
st = con.createStatement();
st.executeUpdate("CREATE TABLE IF NOT EXISTS " + tableName + " ("
+ columnID + " INTEGER AUTO_INCREMENT,"
@@ -173,7 +173,7 @@ public class MySQLThread extends Thread implements DataSource {
PreparedStatement pst = null;
ResultSet rs = null;
try {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
pst = con.prepareStatement("SELECT * FROM " + tableName + " WHERE "
+ columnName + "=?;");
@@ -199,7 +199,7 @@ public class MySQLThread extends Thread implements DataSource {
PreparedStatement pst = null;
ResultSet rs = null;
try {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
pst = con.prepareStatement("SELECT * FROM " + tableName + " WHERE "
+ columnName + "=?;");
pst.setString(1, user);
@@ -237,7 +237,7 @@ public class MySQLThread extends Thread implements DataSource {
Connection con = null;
PreparedStatement pst = null;
try {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
if ((columnSalt.isEmpty() || columnSalt == null) && (auth.getSalt().isEmpty() || auth.getSalt() == null)) {
pst = con.prepareStatement("INSERT INTO " + tableName + "(" + columnName + "," + columnPassword + "," + columnIp + "," + columnLastLogin + ") VALUES (?,?,?,?);");
pst.setString(1, auth.getNickname());
@@ -280,7 +280,7 @@ public class MySQLThread extends Thread implements DataSource {
Connection con = null;
PreparedStatement pst = null;
try {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
pst = con.prepareStatement("UPDATE " + tableName + " SET " + columnPassword + "=? WHERE " + columnName + "=?;");
pst.setString(1, auth.getHash());
pst.setString(2, auth.getNickname());
@@ -303,7 +303,7 @@ public class MySQLThread extends Thread implements DataSource {
Connection con = null;
PreparedStatement pst = null;
try {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
pst = con.prepareStatement("UPDATE " + tableName + " SET " + columnIp + "=?, " + columnLastLogin + "=? WHERE " + columnName + "=?;");
pst.setString(1, auth.getIp());
pst.setLong(2, auth.getLastLogin());
@@ -327,7 +327,7 @@ public class MySQLThread extends Thread implements DataSource {
Connection con = null;
PreparedStatement pst = null;
try {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
pst = con.prepareStatement("DELETE FROM " + tableName + " WHERE " + columnLastLogin + ";");
pst.setLong(1, until);
return pst.executeUpdate();
@@ -348,7 +348,7 @@ public class MySQLThread extends Thread implements DataSource {
Connection con = null;
PreparedStatement pst = null;
try {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
pst = con.prepareStatement("DELETE FROM " + tableName + " WHERE " + columnName + "=?;");
pst.setString(1, user);
pst.executeUpdate();
@@ -370,7 +370,7 @@ public class MySQLThread extends Thread implements DataSource {
Connection con = null;
PreparedStatement pst = null;
try {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
pst = con.prepareStatement("UPDATE " + tableName + " SET "+ lastlocX + " =?, "+ lastlocY +"=?, "+ lastlocZ +"=?, " + lastlocWorld + "=? WHERE " + columnName + "=?;");
pst.setLong(1, auth.getQuitLocX());
pst.setLong(2, auth.getQuitLocY());
@@ -398,7 +398,7 @@ public class MySQLThread extends Thread implements DataSource {
ResultSet rs = null;
int countIp=0;
try {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
pst = con.prepareStatement("SELECT * FROM " + tableName + " WHERE "
+ columnIp + "=?;");
pst.setString(1, ip);
@@ -425,7 +425,7 @@ public class MySQLThread extends Thread implements DataSource {
Connection con = null;
PreparedStatement pst = null;
try {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
pst = con.prepareStatement("UPDATE " + tableName + " SET "+ columnEmail + " =? WHERE " + columnName + "=?;");
pst.setString(1, auth.getEmail());
pst.setString(2, auth.getNickname());
@@ -451,7 +451,7 @@ public class MySQLThread extends Thread implements DataSource {
Connection con = null;
PreparedStatement pst = null;
try {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
pst = con.prepareStatement("UPDATE " + tableName + " SET "+ columnSalt + " =? WHERE " + columnName + "=?;");
pst.setString(1, auth.getSalt());
pst.setString(2, auth.getNickname());
@@ -519,7 +519,7 @@ public class MySQLThread extends Thread implements DataSource {
ResultSet rs = null;
List countIp = new ArrayList();
try {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
pst = con.prepareStatement("SELECT * FROM " + tableName + " WHERE "
+ columnIp + "=?;");
pst.setString(1, auth.getIp());
@@ -548,7 +548,7 @@ public class MySQLThread extends Thread implements DataSource {
ResultSet rs = null;
List countIp = new ArrayList();
try {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
pst = con.prepareStatement("SELECT * FROM " + tableName + " WHERE "
+ columnIp + "=?;");
pst.setString(1, ip);
@@ -577,7 +577,7 @@ public class MySQLThread extends Thread implements DataSource {
ResultSet rs = null;
List countEmail = new ArrayList();
try {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
pst = con.prepareStatement("SELECT * FROM " + tableName + " WHERE "
+ columnEmail + "=?;");
pst.setString(1, email);
@@ -605,7 +605,7 @@ public class MySQLThread extends Thread implements DataSource {
PreparedStatement pst = null;
try {
for (String name : banned) {
- con = conPool.getValidConnection();
+ con = makeSureConnectionIsReady();
pst = con.prepareStatement("DELETE FROM " + tableName + " WHERE " + columnName + "=?;");
pst.setString(1, name);
pst.executeUpdate();
@@ -617,25 +617,46 @@ public class MySQLThread extends Thread implements DataSource {
close(con);
}
}
-
-/* public synchronized boolean makeSureConnectionIsReady() {
+
+ private synchronized Connection makeSureConnectionIsReady() {
+ Connection con = null;
try {
- conPool.getValidConnection();
- return true;
- } catch (TimeoutException te) {
+ con = conPool.getValidConnection();
+ } catch (Exception te) {
try {
+ con = null;
reconnect();
- } catch (TimeoutException e) {
- return false;
- } catch (ClassNotFoundException e) {
- return false;
- } catch (SQLException e) {
- return false;
+ } catch (Exception e) {
+ ConsoleLogger.showError(e.getMessage());
+ if (Settings.isStopEnabled) {
+ ConsoleLogger.showError("Can't reconnect to MySQL database... Please check your MySQL informations ! SHUTDOWN...");
+ AuthMe.getInstance().getServer().shutdown();
+ }
+ if (!Settings.isStopEnabled)
+ AuthMe.getInstance().getServer().getPluginManager().disablePlugin(AuthMe.getInstance());
+ }
+ } catch (AssertionError ae) {
+ // Make sure assertionerror is caused by the connectionpoolmanager, else re-throw it
+ if (!ae.getMessage().equalsIgnoreCase("AuthMeDatabaseError"))
+ throw new AssertionError(ae.getMessage());
+ try {
+ con = null;
+ reconnect();
+ } catch (Exception e) {
+ ConsoleLogger.showError(e.getMessage());
+ if (Settings.isStopEnabled) {
+ ConsoleLogger.showError("Can't reconnect to MySQL database... Please check your MySQL informations ! SHUTDOWN...");
+ AuthMe.getInstance().getServer().shutdown();
+ }
+ if (!Settings.isStopEnabled)
+ AuthMe.getInstance().getServer().getPluginManager().disablePlugin(AuthMe.getInstance());
}
- return true;
}
+ if (con == null)
+ con = conPool.getValidConnection();
+ return con;
}
-
+
private synchronized void reconnect() throws ClassNotFoundException, SQLException, TimeoutException {
conPool.dispose();
Class.forName("com.mysql.jdbc.Driver");
@@ -646,6 +667,7 @@ public class MySQLThread extends Thread implements DataSource {
dataSource.setUser(username);
dataSource.setPassword(password);
conPool = new MiniConnectionPoolManager(dataSource, 10);
- ConsoleLogger.info("Connection pool reconnected");
- } */
+ ConsoleLogger.info("ConnectionPool was unavailable... Reconnected!");
+ }
+
}
diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml
index 1ac92399..8a438a73 100644
--- a/src/main/resources/config.yml
+++ b/src/main/resources/config.yml
@@ -63,6 +63,7 @@ settings:
GameMode:
ForceSurvivalMode: false
ResetInventoryIfCreative: false
+ ForceOnlyAfterLogin: false
security:
minPasswordLength: 4
unLoggedinGroup: unLoggedinGroup
@@ -128,5 +129,7 @@ Hooks:
chestshop: true
bungeecord: false
notifications: true
+ disableSocialSpy: true
+ useEssentialsMotd: false
Performances:
useMultiThreading: false
\ No newline at end of file
diff --git a/src/main/resources/messages_cz.yml b/src/main/resources/messages_cz.yml
index 005e15ab..92ee54e7 100644
--- a/src/main/resources/messages_cz.yml
+++ b/src/main/resources/messages_cz.yml
@@ -1,36 +1,36 @@
unknown_user: '&cHrac neni registrovan.'
not_logged_in: '&cNeprihlasen!'
reg_voluntarily: '&cRegistruj se prikazem "/register heslo heslo".'
-usage_log: '&cPouziti: "/login vaseheslo".'
+usage_log: '&cPouzij: "/login TvojeHeslo".'
wrong_pwd: '&cSpatne heslo.'
unregistered: '&cUspesna unregistrace!'
reg_disabled: '&cRegistrace je zakazana!'
valid_session: '&cAutomaticke znovuprihlaseni.'
login: '&cUspesne prihlaseni!'
user_regged: '&cUzivatelske jmeno je jiz registrovano.'
-usage_reg: '&cPouziti: "/register heslo heslo".'
+usage_reg: '&cPouzij: "/register heslo heslo".'
no_perm: '&cNemas opravneni.'
error: '&cVyskytla se chyba kontaktujte admina ...'
-login_msg: '&cProsim prihlaste se "/login vaseheslo".'
-reg_msg: '&cProsim zaregistrujte se "/register heslo heslo".'
-reg_email_msg: '&cPlease register with "/register "'
-usage_unreg: '&cPouziti: "/unregister vaseheslo".'
+login_msg: '&cProsim prihlas se "/login TvojeHeslo".'
+reg_msg: '&cProsim zaregistruj se "/register heslo heslo".'
+reg_email_msg: '&cProsim registruj se pomoci "/register "'
+usage_unreg: '&cPouzij: "/unregister TvojeHeslo".'
pwd_changed: '&cHeslo zmeneno!'
user_unknown: '&cUzivatelske jmeno neni registrovano.'
reg_only: '&cServer je pouze pro registrovane! Navstivte http://bit.ly/zyEzzS.'
-logged_in: '&cJste jiz prihlasen!'
+logged_in: '&cSes jiz prihlasen!'
logout: '&cOdhlaseni bylo uspesne.'
same_nick: '&cNekdo jiz hraje se stejnym nickem.'
registered: '&cRegistrace byla uspesna!'
reload: '&cPrenacteni AuthMe probehlo uspesne.'
timeout: '&cCas na prihlaseni vyprsel!'
-unsafe_spawn: '&cVase pozice pri odpojeni byla nebezpecna, teleportuji na spawn!'
+unsafe_spawn: '&cTvoje pozice pri odpojeni byla nebezpecna, teleportuji na spawn!'
unvalid_session: '&cChybna data pri cteni pockejte do vyprseni.'
-max_reg: '&cJiz jste prekrocil(a) limit pro pocet uctu z vasi IP.'
+max_reg: '&cJiz jsi prekrocil(a) limit pro pocet uctu z jedne IP.'
password_error: '&cHesla se neshoduji!'
-pass_len: '&cVase heslo nedosahuje minimalni delky (4).'
-vb_nonActiv: '&cVas ucet neni aktivaovany, zkontrolujte si vas E-mail.'
-usage_changepassword: '&cPouziti: "/changepassword stareHeslo noveHeslo".'
+pass_len: '&cTvoje heslo nedosahuje minimalni delky (4).'
+vb_nonActiv: '&cTvuj ucet neni aktivovany, zkontrolujte si vas E-mail.'
+usage_changepassword: '&cPouzij: "/changepassword stareHeslo noveHeslo".'
name_len: '&cTvuj nick je priliz kratky, nebo priliz dlouhy'
regex: '&cTvuj nick obsahuje nepovolene znaky. Pripustne znaky jsou: REG_EX'
add_email: '&cPridej prosim svuj email pomoci : /email add TvujEmail TvujEmail'
@@ -41,13 +41,13 @@ wrong_captcha: '&cSpatne opsana Captcha, pouzij prosim: /captcha CAPTCHA_TEXT'
valid_captcha: '&cZadana captcha je OK !'
kick_forvip: '&cA VIP Hrac se pripojil na plny server!'
kick_fullserver: '&cServer je plne obsazen, zkus to pozdeji prosim !'
-usage_email_add: '&fUsage: /email add '
-usage_email_change: '&fUsage: /email change newEmail> '
-usage_email_recovery: '&fUsage: /email recovery '
-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 !'
+usage_email_add: '&fPouzij: /email add '
+usage_email_change: '&fPouzij: /email change '
+usage_email_recovery: '&fPouzij: /email recovery '
+new_email_invalid: '[AuthMe] Novy email je chybne zadan!'
+old_email_invalid: '[AuthMe] Stary email je chybne zadan!'
+email_invalid: '[AuthMe] Nespravny email'
+email_added: '[AuthMe] Email pridan !'
+email_confirm: '[AuthMe] Potvrd prosim svuj email !'
+email_changed: '[AuthMe] Email zmenen !'
+email_send: '[AuthMe] Email pro obnoveni hesla odeslan !'
diff --git a/src/main/resources/messages_es.yml b/src/main/resources/messages_es.yml
index 39aa32e4..b6824ff7 100644
--- a/src/main/resources/messages_es.yml
+++ b/src/main/resources/messages_es.yml
@@ -40,15 +40,15 @@ recovery_email: '&c¿Olvidaste tu contraseña? Por favor usa /email recovery '
wrong_captcha: '&cCaptcha incorrecto, please use : /captcha EL_CAPTCHA'
valid_captcha: '&c¡ Captcha ingresado correctamente !'
-kick_forvip: '&cA VIP Player join the full server!'
-kick_fullserver: '&cThe server is actually full, Sorry!'
-usage_email_add: '&fUsage: /email add '
-usage_email_change: '&fUsage: /email change '
-usage_email_recovery: '&fUsage: /email recovery '
-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 !'
\ No newline at end of file
+kick_forvip: '&cUn jugador VIP ha ingresado al servidor lleno!'
+kick_fullserver: '&cEl servidor está lleno, lo sentimos!'
+usage_email_add: '&fUso: /email add '
+usage_email_change: '&fUso: /email change '
+usage_email_recovery: '&fUso: /email recovery '
+new_email_invalid: '[AuthMe] Nuevo email inválido!'
+old_email_invalid: '[AuthMe] Email anterior inválido!'
+email_invalid: '[AuthMe] Email inválido'
+email_added: '[AuthMe] Email agregado !'
+email_confirm: '[AuthMe] Confirma tu Email !'
+email_changed: '[AuthMe] Email cambiado !'
+email_send: '[AuthMe] Correo de recuperación enviado !'
diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml
index 37882aa7..43328a2d 100644
--- a/src/main/resources/plugin.yml
+++ b/src/main/resources/plugin.yml
@@ -1,9 +1,9 @@
name: AuthMe
author: Xephi59
-website: http://www.multiplayer-italia.com/
+website: http://dev.bukkit.org/bukkit-plugins/authme-reloaded/
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: uk.org.whoami.authme.AuthMe
-version: 2.9.3
+version: 2.9.4
softdepend: [Vault, ChestShop, Spout, Multiverse-Core, Notifications, Citizens, CombatTag, Essentials, EssentialsSpawn]
commands:
register:
@@ -137,4 +137,7 @@ permissions:
default: op
authme.admin.purgebannedplayers:
description: Purge banned players
+ default: op
+ authme.admin.flattosqlite:
+ description: Convert File to Sqlite method
default: op
\ No newline at end of file