Package ch.njol.skript.bukkitutil
Class PotionEffectUtils
java.lang.Object
ch.njol.skript.bukkitutil.PotionEffectUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addEffects
(LivingEntity entity, Object[] effects) Add PotionEffects to an entitystatic void
addEffects
(ItemStack itemStack, Object[] effects) Add PotionEffects to an ItemTyestatic void
clearAllEffects
(LivingEntity entity) Clear all the activePotionEffects
from an Entitystatic void
clearAllEffects
(ItemStack itemStack) Clear allPotionEffects
from an ItemTypestatic List
<PotionEffect> getEffects
(ItemStack itemStack) Get all the PotionEffects of an ItemTypestatic void
removeEffects
(LivingEntity entity, Object[] effects) Remove a PotionEffect from an entitystatic void
removeEffects
(ItemStack itemStack, Object[] effects) Remove a PotionEffect from an ItemTypestatic String
toString
(PotionEffect potionEffect)
-
Method Details
-
toString
-
clearAllEffects
Clear all the activePotionEffects
from an Entity- Parameters:
entity
- Entity to clear effects for
-
addEffects
Add PotionEffects to an entity- Parameters:
entity
- Entity to add effects toeffects
-PotionEffect
orPotionEffectType
to add
-
removeEffects
Remove a PotionEffect from an entity- Parameters:
entity
- Entity to remove effects foreffects
-PotionEffect
orPotionEffectType
to remove
-
clearAllEffects
Clear allPotionEffects
from an ItemType- Parameters:
itemStack
- Item to remove effects from
-
addEffects
Add PotionEffects to an ItemTye- Parameters:
itemStack
- Item to add effects toeffects
-PotionEffect
orPotionEffectType
to add
-
removeEffects
Remove a PotionEffect from an ItemType- Parameters:
itemStack
- Item to remove effects fromeffects
-PotionEffect
orPotionEffectType
to 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
-