mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-18 15:17:36 +01:00
Caught NullPointerException caused by getting the players list too early.
This commit is contained in:
parent
8192a1962a
commit
c96bb890b4
@ -147,6 +147,7 @@ public void postReload() {
|
|||||||
invinciblePlayers.clear();
|
invinciblePlayers.clear();
|
||||||
amphibiousPlayers.clear();
|
amphibiousPlayers.clear();
|
||||||
|
|
||||||
|
try {
|
||||||
for (Player player : etc.getServer().getPlayerList()) {
|
for (Player player : etc.getServer().getPlayerList()) {
|
||||||
if (player.isInGroup("wg-invincible")) {
|
if (player.isInGroup("wg-invincible")) {
|
||||||
invinciblePlayers.add(player.getName());
|
invinciblePlayers.add(player.getName());
|
||||||
@ -156,6 +157,8 @@ public void postReload() {
|
|||||||
amphibiousPlayers.add(player.getName());
|
amphibiousPlayers.add(player.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (NullPointerException e) { // Thrown if loaded too early
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user