Interface INpcEvent.DamagedEvent

    • Method Detail

      • getSource

        IEntity getSource()
        Returns:
        the entity that caused the damage, or null.
      • getDamageSource

        IDamageSource getDamageSource()
        Returns:
        the damage source details.
      • getDamage

        float getDamage()
        Returns:
        the damage amount.
      • setDamage

        void setDamage​(float damage)
        Parameters:
        damage - the new damage amount.
      • setClearTarget

        void setClearTarget​(boolean bo)
        Parameters:
        bo - whether to clear the NPC's current target after damage.
      • getClearTarget

        boolean getClearTarget()
        Returns:
        whether the NPC's target will be cleared after damage.
      • getType

        String getType()
        Returns:
        the damage type string.