mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2025-01-27 10:01:34 +01:00
Fix NPE
This commit is contained in:
parent
7f7b713e67
commit
3fe1c4edae
@ -543,8 +543,8 @@ public class AuthMe extends JavaPlugin {
|
||||
Location spawnLoc = world.getSpawnLocation();
|
||||
for (int i = spawnPriority.length - 1; i >= 0; i--) {
|
||||
String s = spawnPriority[i];
|
||||
if (s.equalsIgnoreCase("default") && getDefaultSpawn() != null)
|
||||
spawnLoc = getDefaultSpawn();
|
||||
if (s.equalsIgnoreCase("default") && getDefaultSpawn(world) != null)
|
||||
spawnLoc = getDefaultSpawn(world);
|
||||
if (s.equalsIgnoreCase("multiverse") && getMultiverseSpawn(world) != null)
|
||||
spawnLoc = getMultiverseSpawn(world);
|
||||
if (s.equalsIgnoreCase("essentials") && getEssentialsSpawn() != null)
|
||||
@ -557,8 +557,8 @@ public class AuthMe extends JavaPlugin {
|
||||
return spawnLoc;
|
||||
}
|
||||
|
||||
private Location getDefaultSpawn() {
|
||||
return this.getServer().getWorld(Settings.defaultWorld).getSpawnLocation();
|
||||
private Location getDefaultSpawn(World world) {
|
||||
return world.getSpawnLocation();
|
||||
}
|
||||
|
||||
private Location getMultiverseSpawn(World world) {
|
||||
|
Loading…
Reference in New Issue
Block a user