Fix permabones config check

This commit is contained in:
Lucwousin
2019-11-21 09:35:19 +01:00
parent 2004dc230f
commit 74ae4d2723

View File

@@ -229,24 +229,24 @@ public class DeathIndicatorPlugin extends Plugin
private void onPlayerDeath(PlayerDeath death)
{
if (client.isInInstancedRegion() || death.getPlayer().getWorldLocation().getRegionID() == 13362)
if (client.isInInstancedRegion())
{
return;
}
if (death.getPlayer() != client.getLocalPlayer())
final Player player = death.getPlayer();
if (config.permaBones() && player.getWorldLocation().getRegionID() != 13362)
{
newBoneFor(player);
}
if (player != client.getLocalPlayer())
{
newBoneFor(death.getPlayer());
return;
}
Player lp = client.getLocalPlayer();
if (config.permaBones())
{
newBoneFor(lp);
}
lastDeath = lp.getWorldLocation();
lastDeath = player.getWorldLocation();
lastDeathWorld = client.getWorld();
lastDeathTime = Instant.now();
}