if (ammo != null && ammo.getAmount() > 1) {
ammoType = ammo.getName().toLowerCase().split(" ")[1];
isUsingRanged = true;
}
if (isUsingRanged) {
Item item = getEquipment().getItemInSlot(EquipmentSlot.CAPE.slot);
isAvasEquipped = item != null && (item.getName().contains("Ava's"));
}
What's the point of this code? There's no reason to have a check for isUsingRanged right after setting the value of isUsingRanged. Just put that code in the previous if statement.