mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-24 19:45:43 +01:00
Fix null check position in PlayerDeathListener
This commit is contained in:
parent
9fcdba3d1c
commit
56c3e982ba
@ -26,8 +26,8 @@ public class PlayerDeathListener implements Listener {
|
||||
|
||||
DConfig dConfig = GameWorld.get(player.getLocation().getWorld()).config;
|
||||
|
||||
if (dConfig.getKeepInventoryOnDeath()) {
|
||||
if (dPlayer != null) {
|
||||
if (dConfig.getKeepInventoryOnDeath()) {
|
||||
dPlayer.respawnInventory = event.getEntity().getInventory().getContents();
|
||||
dPlayer.respawnArmor = event.getEntity().getInventory().getArmorContents();
|
||||
// Delete all drops
|
||||
@ -35,7 +35,6 @@ public class PlayerDeathListener implements Listener {
|
||||
istack.setType(Material.AIR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (p.lives.containsKey(player)) {
|
||||
lives = p.lives.get(player) - 1;
|
||||
@ -48,6 +47,7 @@ public class PlayerDeathListener implements Listener {
|
||||
} else if (!(lives == -1)) {
|
||||
p.msg(player, p.language.get("Player_Death").replaceAll("v1", String.valueOf(lives)));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user