mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
Removed no longer needed method (Misc.hasArmor)
This commit is contained in:
parent
9f22382506
commit
505d6e258f
@ -60,22 +60,6 @@ public final class Misc {
|
||||
return NORMAL_SKILL_ACTIVATION_CHANCE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a LivingEntity has armor.
|
||||
*
|
||||
* @param entity LivingEntity whose armor to check
|
||||
* @return true if the player has armor, false otherwise
|
||||
*/
|
||||
public static boolean hasArmor(LivingEntity entity) {
|
||||
for (ItemStack armor : entity.getEquipment().getArmorContents()) {
|
||||
if (armor.getType() != Material.AIR) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isFriendlyPet(Player attacker, Tameable pet) {
|
||||
if (pet.isTamed()) {
|
||||
AnimalTamer tamer = pet.getOwner();
|
||||
|
Loading…
Reference in New Issue
Block a user