mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2025-01-05 15:37:38 +01:00
Fix ArrayOutOfBoundsException with spawn priority
This commit is contained in:
parent
9001cd4ebc
commit
aa7415a151
@ -699,6 +699,11 @@ public class AuthMe extends JavaPlugin {
|
|||||||
public Location getSpawnLocation(Player player) {
|
public Location getSpawnLocation(Player player) {
|
||||||
World world = player.getWorld();
|
World world = player.getWorld();
|
||||||
String[] spawnPriority = Settings.spawnPriority.split(",");
|
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();
|
Location spawnLoc = world.getSpawnLocation();
|
||||||
int i = 3;
|
int i = 3;
|
||||||
for (i = 3 ; i >= 0 ; i--) {
|
for (i = 3 ; i >= 0 ; i--) {
|
||||||
|
Loading…
Reference in New Issue
Block a user