Do not put a null world at respawn
This commit is contained in:
parent
db27341832
commit
c12643a138
@ -27,6 +27,11 @@ public class CacheDataSource extends Thread implements DataSource {
|
|||||||
cache.put(auth.getNickname(), auth);
|
cache.put(auth.getNickname(), auth);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
this.setName("AuthMeCacheThread");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized boolean isAuthAvailable(String user) {
|
public synchronized boolean isAuthAvailable(String user) {
|
||||||
if (cache.containsKey(user.toLowerCase()))
|
if (cache.containsKey(user.toLowerCase()))
|
||||||
|
|||||||
@ -48,6 +48,7 @@ public class FlatFileThread extends Thread implements DataSource {
|
|||||||
AuthMe.getInstance().getServer().getPluginManager().disablePlugin(AuthMe.getInstance());
|
AuthMe.getInstance().getServer().getPluginManager().disablePlugin(AuthMe.getInstance());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.setName("AuthMeFlatFileThread");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -94,10 +94,11 @@ public class MySQLThread extends Thread implements DataSource {
|
|||||||
AuthMe.getInstance().getServer().getPluginManager().disablePlugin(AuthMe.getInstance());
|
AuthMe.getInstance().getServer().getPluginManager().disablePlugin(AuthMe.getInstance());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.setName("AuthMeMySQLThread");
|
||||||
}
|
}
|
||||||
|
|
||||||
private synchronized void connect() throws ClassNotFoundException,
|
private synchronized void connect() throws ClassNotFoundException,
|
||||||
SQLException, TimeoutException {
|
SQLException, TimeoutException, NumberFormatException {
|
||||||
Class.forName("com.mysql.jdbc.Driver");
|
Class.forName("com.mysql.jdbc.Driver");
|
||||||
ConsoleLogger.info("MySQL driver loaded");
|
ConsoleLogger.info("MySQL driver loaded");
|
||||||
MysqlConnectionPoolDataSource dataSource = new MysqlConnectionPoolDataSource();
|
MysqlConnectionPoolDataSource dataSource = new MysqlConnectionPoolDataSource();
|
||||||
|
|||||||
@ -72,6 +72,7 @@ public class SQLiteThread extends Thread implements DataSource {
|
|||||||
AuthMe.getInstance().getServer().getPluginManager().disablePlugin(AuthMe.getInstance());
|
AuthMe.getInstance().getServer().getPluginManager().disablePlugin(AuthMe.getInstance());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.setName("AuthMeSQLiteThread");
|
||||||
}
|
}
|
||||||
|
|
||||||
private synchronized void connect() throws ClassNotFoundException,
|
private synchronized void connect() throws ClassNotFoundException,
|
||||||
|
|||||||
@ -1177,7 +1177,8 @@ public class AuthMePlayerListener implements Listener {
|
|||||||
} catch (NullPointerException npe) {
|
} catch (NullPointerException npe) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
event.setRespawnLocation(spawn);
|
if (spawn != null && spawn.getWorld() != null)
|
||||||
|
event.setRespawnLocation(spawn);
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGHEST)
|
@EventHandler(priority = EventPriority.HIGHEST)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user