Merge pull request #2059 from Lucwousin/boner-config-check

deathindicators: Fix permabones config check
This commit is contained in:
Lucwousin
2019-11-21 10:20:08 +01:00
committed by GitHub

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();
}