Class PotionEffectUtils

java.lang.Object
ch.njol.skript.bukkitutil.PotionEffectUtils

public abstract class PotionEffectUtils extends Object
  • Method Details

    • toString

      public static String toString(PotionEffect potionEffect)
    • clearAllEffects

      public static void clearAllEffects(LivingEntity entity)
      Clear all the active PotionEffects from an Entity
      Parameters:
      entity - Entity to clear effects for
    • addEffects

      public static void addEffects(LivingEntity entity, Object[] effects)
      Add PotionEffects to an entity
      Parameters:
      entity - Entity to add effects to
      effects - PotionEffect or PotionEffectType to add
    • removeEffects

      public static void removeEffects(LivingEntity entity, Object[] effects)
      Remove a PotionEffect from an entity
      Parameters:
      entity - Entity to remove effects for
      effects - PotionEffect or PotionEffectType to remove
    • clearAllEffects

      public static void clearAllEffects(ItemStack itemStack)
      Clear all PotionEffects from an ItemType
      Parameters:
      itemStack - Item to remove effects from
    • addEffects

      public static void addEffects(ItemStack itemStack, Object[] effects)
      Add PotionEffects to an ItemTye
      Parameters:
      itemStack - Item to add effects to
      effects - PotionEffect or PotionEffectType to add
    • removeEffects

      public static void removeEffects(ItemStack itemStack, Object[] effects)
      Remove a PotionEffect from an ItemType
      Parameters:
      itemStack - Item to remove effects from
      effects - PotionEffect or PotionEffectType to remove
    • getEffects

      public static List<PotionEffect> getEffects(ItemStack itemStack)
      Get all the PotionEffects of an ItemType

      This will also include the base potion as well

      Parameters:
      itemStack - Item to get potions from
      Returns:
      List of PotionEffects on the item