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