Class hardenediron

java.lang.Object
valorless.rarespawns.ability.builtin.hardenediron
All Implemented Interfaces:
org.bukkit.event.Listener, Ability

public class hardenediron extends Object implements Ability, org.bukkit.event.Listener
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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    execute(EntityData data, org.bukkit.entity.Mob rare)
    Executes the Hardened Iron ability, registering the event listener for projectile damage.
    void
    onProjectile(org.bukkit.event.entity.EntityDamageByEntityEvent event)
    Event handler for projectile damage to the rare entity.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • hardenediron

      public hardenediron()
  • Method Details

    • execute

      public void execute(EntityData data, org.bukkit.entity.Mob rare)
      Executes the Hardened Iron ability, registering the event listener for projectile damage.
      Specified by:
      execute in interface Ability
      Parameters:
      data - The EntityData for the rare entity.
      rare - The Mob instance representing the rare entity.
    • 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.