Two small fixes (#4321)

* Fixed armor counting in BleedTimerTask

* Key instead of Name for Piercing
This commit is contained in:
TheBusyBiscuit
2020-11-02 22:57:53 +01:00
committed by GitHub
parent 65fba3e20e
commit 01ebba4443
2 changed files with 15 additions and 5 deletions

View File

@ -69,9 +69,11 @@ public class BleedTimerTask extends BukkitRunnable {
}
//Count Armor
for(ItemStack armorPiece : ((Player) target).getInventory().getArmorContents())
{
armorCount++;
for (ItemStack armorPiece : ((Player) target).getInventory().getArmorContents()) {
//We only want to count slots that contain armor.
if (armorPiece != null) {
armorCount++;
}
}
} else {