Class hardenediron
java.lang.Object
valorless.rarespawns.ability.builtin.hardenediron
- All Implemented Interfaces:
org.bukkit.event.Listener,Ability
Ability: Hardened Iron
Cancels projectile damage to the rare entity when its health drops below 50%.
This ability is used to make the rare entity immune to projectiles when low on health.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(EntityData data, org.bukkit.entity.Mob rare) Executes the Hardened Iron ability, registering the event listener for projectile damage.voidonProjectile(org.bukkit.event.entity.EntityDamageByEntityEvent event) Event handler for projectile damage to the rare entity.
-
Constructor Details
-
hardenediron
public hardenediron()
-
-
Method Details
-
execute
Executes the Hardened Iron ability, registering the event listener for projectile damage. -
onProjectile
public void onProjectile(org.bukkit.event.entity.EntityDamageByEntityEvent event) Event handler for projectile damage to the rare entity. Cancels projectile damage if the rare entity's health is 50% or lower.- Parameters:
event- The EntityDamageByEntityEvent triggered by projectile damage.
-