Class ShieldEffect

java.lang.Object
studio.magemonkey.fabled.shield.ShieldEffect

public class ShieldEffect extends Object
  • Constructor Details

    • ShieldEffect

      public ShieldEffect(String name, String classifier, double amount, double percent)
    • ShieldEffect

      public ShieldEffect(String name, String classifier, double amount)
  • Method Details

    • destroy

      public void destroy()
    • breakShield

      public void breakShield(org.bukkit.entity.LivingEntity entity)
      Breaks the shield effect, removing it from the entity. This calls a FabledShieldBreakEvent Also, optionally plays a sound to the player.
      Parameters:
      entity - the entity to break the shield for
    • damage

      public double damage(org.bukkit.entity.LivingEntity entity, double amount)
      Applies damage to the shield effect, first reducing the damage by the percent value. If the shield does not absorb all the damage, the remaining damage is returned.
      Parameters:
      entity - the entity to play the hit sound to
      amount - the amount of damage to apply
      Returns:
      the remaining damage that was not absorbed by the shield
    • damageAndDisplay

      public double damageAndDisplay(double amount, org.bukkit.entity.LivingEntity entity)
    • getRemaining

      public double getRemaining()
    • isExhausted

      public boolean isExhausted()
    • display

      public void display(org.bukkit.entity.Player player)
      Displays the shield effect to the player.
      Parameters:
      player - the player to display shields to
    • getName

      public String getName()
    • getClassifier

      public String getClassifier()
    • getAmount

      public double getAmount()
    • getPercent

      public double getPercent()
    • getDisplayLocation

      public ShieldDisplay getDisplayLocation()
    • getTaken

      public double getTaken()
    • getBarColor

      public org.bukkit.boss.BarColor getBarColor()
    • getBarStyle

      public org.bukkit.boss.BarStyle getBarStyle()
    • getHitSound

      public org.bukkit.Keyed getHitSound()
    • getBreakSound

      public org.bukkit.Keyed getBreakSound()
    • getTask

      public org.bukkit.scheduler.BukkitTask getTask()
    • setPercent

      public void setPercent(double percent)
    • setDisplayLocation

      public void setDisplayLocation(ShieldDisplay displayLocation)
    • setTaken

      public void setTaken(double taken)
    • setBarColor

      public void setBarColor(org.bukkit.boss.BarColor barColor)
    • setBarStyle

      public void setBarStyle(org.bukkit.boss.BarStyle barStyle)
    • setHitSound

      public void setHitSound(org.bukkit.Keyed hitSound)
    • setBreakSound

      public void setBreakSound(org.bukkit.Keyed breakSound)
    • setTask

      public void setTask(org.bukkit.scheduler.BukkitTask task)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object