Do not put a null world at respawn

This commit is contained in:
Xephi 2015-05-04 16:41:50 +02:00
parent db27341832
commit c12643a138
5 changed files with 11 additions and 2 deletions

View File

@ -27,6 +27,11 @@ public class CacheDataSource extends Thread implements DataSource {
cache.put(auth.getNickname(), auth);
}
public void run()
{
this.setName("AuthMeCacheThread");
}
@Override
public synchronized boolean isAuthAvailable(String user) {
if (cache.containsKey(user.toLowerCase()))

View File

@ -48,6 +48,7 @@ public class FlatFileThread extends Thread implements DataSource {
AuthMe.getInstance().getServer().getPluginManager().disablePlugin(AuthMe.getInstance());
return;
}
this.setName("AuthMeFlatFileThread");
}
@Override

View File

@ -94,10 +94,11 @@ public class MySQLThread extends Thread implements DataSource {
AuthMe.getInstance().getServer().getPluginManager().disablePlugin(AuthMe.getInstance());
return;
}
this.setName("AuthMeMySQLThread");
}
private synchronized void connect() throws ClassNotFoundException,
SQLException, TimeoutException {
SQLException, TimeoutException, NumberFormatException {
Class.forName("com.mysql.jdbc.Driver");
ConsoleLogger.info("MySQL driver loaded");
MysqlConnectionPoolDataSource dataSource = new MysqlConnectionPoolDataSource();

View File

@ -72,6 +72,7 @@ public class SQLiteThread extends Thread implements DataSource {
AuthMe.getInstance().getServer().getPluginManager().disablePlugin(AuthMe.getInstance());
return;
}
this.setName("AuthMeSQLiteThread");
}
private synchronized void connect() throws ClassNotFoundException,

View File

@ -1177,6 +1177,7 @@ public class AuthMePlayerListener implements Listener {
} catch (NullPointerException npe) {
}
}
if (spawn != null && spawn.getWorld() != null)
event.setRespawnLocation(spawn);
}