diff --git a/src/main/java/fr/xephi/authme/AuthMe.java b/src/main/java/fr/xephi/authme/AuthMe.java index a362b2c3c..ae5163126 100644 --- a/src/main/java/fr/xephi/authme/AuthMe.java +++ b/src/main/java/fr/xephi/authme/AuthMe.java @@ -608,14 +608,8 @@ public class AuthMe extends JavaPlugin { public Location getSpawnLocation(Player player) { World world = player.getWorld(); String[] spawnPriority = Settings.spawnPriority.split(","); - if (spawnPriority.length < 4) { - ConsoleLogger.showError("Check your config for spawnPriority, you need to put all of 4 spawn priorities"); - ConsoleLogger.showError("Defaulting Spawn to world's one"); - return world.getSpawnLocation(); - } Location spawnLoc = world.getSpawnLocation(); - int i = 3; - for (i = 3; i >= 0; i--) { + for (int i = spawnPriority.length - 1; i >= 0; i--) { String s = spawnPriority[i]; if (s.equalsIgnoreCase("default") && getDefaultSpawn(world) != null) spawnLoc = getDefaultSpawn(world);