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