From 45f260579484c02caf21ff6e82af4d36055e5d7d Mon Sep 17 00:00:00 2001 From: Andreas Troelsen Date: Wed, 27 Mar 2013 14:09:10 +0100 Subject: [PATCH] Don't repair potions and wool. --- src/com/garbagemule/MobArena/ArenaListener.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/com/garbagemule/MobArena/ArenaListener.java b/src/com/garbagemule/MobArena/ArenaListener.java index 35e4e70..579db0a 100644 --- a/src/com/garbagemule/MobArena/ArenaListener.java +++ b/src/com/garbagemule/MobArena/ArenaListener.java @@ -538,7 +538,10 @@ public class ArenaListener // Dirty hack for invincible weapons ItemStack weapon = p.getInventory().getContents()[p.getInventory().getHeldItemSlot()]; - if (weapon != null) weapon.setDurability((short) 0); + if (weapon != null && // Avoid NPE + weapon.getTypeId() != 373 && // Prevent potion -> water bottle + weapon.getTypeId() != 35) // Prevent wool -> white wool + weapon.setDurability((short) 0); ArenaPlayerStatistics aps = arena.getArenaPlayer(p).getStats(); aps.add("dmgDone", event.getDamage());