mirror of
https://github.com/garbagemule/MobArena.git
synced 2025-01-11 19:00:38 +01:00
Fix NPE caused by weaponless damage.
This commit is contained in:
parent
4b970c6fce
commit
fd8bfbf1f0
@ -537,7 +537,8 @@ public class ArenaListener
|
||||
}
|
||||
|
||||
// Dirty hack for invincible weapons
|
||||
p.getInventory().getContents()[p.getInventory().getHeldItemSlot()].setDurability((short) 0);
|
||||
ItemStack weapon = p.getInventory().getContents()[p.getInventory().getHeldItemSlot()];
|
||||
if (weapon != null) weapon.setDurability((short) 0);
|
||||
|
||||
ArenaPlayerStatistics aps = arena.getArenaPlayer(p).getStats();
|
||||
aps.add("dmgDone", event.getDamage());
|
||||
|
Loading…
Reference in New Issue
Block a user