Package ch.njol.skript.bukkitutil
Class PotionEffectUtils
java.lang.Object
ch.njol.skript.bukkitutil.PotionEffectUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddEffects(LivingEntity entity, Object[] effects) Add PotionEffects to an entitystatic voidaddEffects(ItemStack itemStack, Object[] effects) Add PotionEffects to an ItemTyestatic voidclearAllEffects(LivingEntity entity) Clear all the activePotionEffectsfrom an Entitystatic voidclearAllEffects(ItemStack itemStack) Clear allPotionEffectsfrom an ItemTypestatic List<PotionEffect> getEffects(ItemStack itemStack) Get all the PotionEffects of an ItemTypestatic voidremoveEffects(LivingEntity entity, Object[] effects) Remove a PotionEffect from an entitystatic voidremoveEffects(ItemStack itemStack, Object[] effects) Remove a PotionEffect from an ItemTypestatic StringtoString(PotionEffect potionEffect)
-
Method Details
-
toString
-
clearAllEffects
Clear all the activePotionEffectsfrom an Entity- Parameters:
entity- Entity to clear effects for
-
addEffects
Add PotionEffects to an entity- Parameters:
entity- Entity to add effects toeffects-PotionEffectorPotionEffectTypeto add
-
removeEffects
Remove a PotionEffect from an entity- Parameters:
entity- Entity to remove effects foreffects-PotionEffectorPotionEffectTypeto remove
-
clearAllEffects
Clear allPotionEffectsfrom an ItemType- Parameters:
itemStack- Item to remove effects from
-
addEffects
Add PotionEffects to an ItemTye- Parameters:
itemStack- Item to add effects toeffects-PotionEffectorPotionEffectTypeto add
-
removeEffects
Remove a PotionEffect from an ItemType- Parameters:
itemStack- Item to remove effects fromeffects-PotionEffectorPotionEffectTypeto remove
-
getEffects
Get all the PotionEffects of an ItemTypeThis will also include the base potion as well
- Parameters:
itemStack- Item to get potions from- Returns:
- List of PotionEffects on the item
-