mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-28 05:25:20 +01:00
fixed npe for onPlayerRespawn
This commit is contained in:
parent
d02c5057c6
commit
a258400443
@ -260,6 +260,8 @@ public void onPlayerRespawn(PlayerRespawnEvent event) {
|
||||
String spawnconfig = regions.getAreaFlag("spawn", "settings", true, null);
|
||||
Location spawn = regions.getLocationAreaFlag("spawn", player.getServer(), true, null);
|
||||
|
||||
if (spawn != null) {
|
||||
if (spawnconfig != null) {
|
||||
if (spawnconfig.equals("owner")) {
|
||||
if (regions.isOwner(localPlayer)) {
|
||||
player.teleportTo(spawn);
|
||||
@ -271,6 +273,9 @@ public void onPlayerRespawn(PlayerRespawnEvent event) {
|
||||
} else {
|
||||
player.teleportTo(spawn);
|
||||
}
|
||||
|
||||
} else {
|
||||
player.teleportTo(spawn);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user