Class TrueDamageEvent

java.lang.Object
org.bukkit.event.Event
studio.magemonkey.fabled.api.event.TrueDamageEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class TrueDamageEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
Event for when true damage is dealt (damage ignoring armor)
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    org.bukkit.event.Event.Result
  • Constructor Summary

    Constructors
    Constructor
    Description
    TrueDamageEvent(Skill skill, org.bukkit.entity.LivingEntity damager, org.bukkit.entity.LivingEntity target, double damage)
    Initializes a new event
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Retrieves the amount of damage dealt
    org.bukkit.entity.LivingEntity
    Retrieves the entity that dealt the damage
    static org.bukkit.event.HandlerList
    Retrieves the handlers for the event
    org.bukkit.event.HandlerList
    Retrieves the handlers for the event
     
    org.bukkit.entity.LivingEntity
    Retrieves the entity that received the damage
    boolean
    Checks whether the event is cancelled
    void
    setCancelled(boolean cancelled)
    Sets the cancelled state of the event
    void
    setDamage(double amount)
    Sets the amount of damage dealt

    Methods inherited from class org.bukkit.event.Event

    getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

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

    • TrueDamageEvent

      public TrueDamageEvent(Skill skill, org.bukkit.entity.LivingEntity damager, org.bukkit.entity.LivingEntity target, double damage)
      Initializes a new event
      Parameters:
      damager - entity dealing the damage
      target - entity receiving the damage
      damage - the amount of damage dealt
  • Method Details

    • getSkill

      public Skill getSkill()
      Returns:
      skill used to deal the damage
    • getDamager

      public org.bukkit.entity.LivingEntity getDamager()
      Retrieves the entity that dealt the damage
      Returns:
      entity that dealt the damage
    • getTarget

      public org.bukkit.entity.LivingEntity getTarget()
      Retrieves the entity that received the damage
      Returns:
      entity that received the damage
    • getDamage

      public double getDamage()
      Retrieves the amount of damage dealt
      Returns:
      amount of damage dealt
    • setDamage

      public void setDamage(double amount)
      Sets the amount of damage dealt
      Parameters:
      amount - amount of damage dealt
    • isCancelled

      public boolean isCancelled()
      Checks whether the event is cancelled
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
      Returns:
      true if cancelled, false otherwise
    • setCancelled

      public void setCancelled(boolean cancelled)
      Sets the cancelled state of the event
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
      Parameters:
      cancelled - the cancelled state of the event
    • getHandlers

      public org.bukkit.event.HandlerList getHandlers()
      Retrieves the handlers for the event
      Specified by:
      getHandlers in class org.bukkit.event.Event
      Returns:
      list of event handlers
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
      Retrieves the handlers for the event
      Returns:
      list of event handlers