public class ArmorDurability extends ItemDurability
ItemDurability
remain at their defaults.Constructor and Description |
---|
ArmorDurability() |
Modifier and Type | Method and Description |
---|---|
int |
getArmorDamage(org.bukkit.event.entity.EntityDamageEvent.DamageCause cause,
float damage,
boolean hadThorns)
Calculates the damage that the armor will take for the specified damage.
|
java.util.List<org.bukkit.event.entity.EntityDamageEvent.DamageCause> |
getDamageCuasesWithDurability() |
int |
getThornsExtraDamage() |
int |
getThornsExtraDamageOnHit() |
ArmorDurability |
setDamageCuasesWithDurability(java.util.ArrayList<org.bukkit.event.entity.EntityDamageEvent.DamageCause> damageCuasesWithDurability)
Set the
EntityDamageEvent.DamageCause s that will affect the Armor's Durability. |
ArmorDurability |
setThornsExtraDamage(int thornsExtraDamage)
Set the extra durability that will be reduced in case the Armor has the
Thorns Enchantment.
|
ArmorDurability |
setThornsExtraDamageOnHit(int thornsExtraDamageOnHit)
Set the extra amount of damage that will be dealt in case the Thorn
enchantment hits back the entity that attacked the player that wears this
armor piece.
|
addSpecialBlock, getAllSpecialBlocks, getBlockBreak, getBlockBreak, getEntityHit, getInstantBlockBreak, getSpecialBlockDurability, setBlockBreak, setEntityHit, setInstantBlockBreak
public int getThornsExtraDamage()
public ArmorDurability setThornsExtraDamage(int thornsExtraDamage)
thornsExtraDamage
- public java.util.List<org.bukkit.event.entity.EntityDamageEvent.DamageCause> getDamageCuasesWithDurability()
EntityDamageEvent.DamageCause
s that will affect the Armor's Durability.public ArmorDurability setDamageCuasesWithDurability(java.util.ArrayList<org.bukkit.event.entity.EntityDamageEvent.DamageCause> damageCuasesWithDurability)
EntityDamageEvent.DamageCause
s that will affect the Armor's Durability.damageCuasesWithDurability
- public int getThornsExtraDamageOnHit()
public ArmorDurability setThornsExtraDamageOnHit(int thornsExtraDamageOnHit)
thornsExtraDamageOnHit
- public int getArmorDamage(org.bukkit.event.entity.EntityDamageEvent.DamageCause cause, float damage, boolean hadThorns)
EntityDamageEvent.DamageCause
as well as calculations for adding extra
damage if the armor piece had Thorns.