Package fr.andross.banitem.utils.potions
Class PotionHelper
java.lang.Object
fr.andross.banitem.utils.potions.PotionHelper
A potion helper class to retrieve correct Bukkit PotionEffectType object across versions
- Version:
- 3.1.1
- Author:
- Andross
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.potion.PotionEffectType
getPotionEffectType
(String name) Try to get aPotionEffectType
object by the namestatic PotionWrapper
getPotionWrapper
(String potion) Try to get aPotionWrapper
from a string which synthax must be 'potion:level'
-
Constructor Details
-
PotionHelper
public PotionHelper()
-
-
Method Details
-
getPotionEffectType
@Nullable public static org.bukkit.potion.PotionEffectType getPotionEffectType(@NotNull String name) Try to get aPotionEffectType
object by the name- Parameters:
name
- name of the potion effect type- Returns:
- the bukkit PotionEffectType, null if not found
-
getPotionWrapper
Try to get aPotionWrapper
from a string which synthax must be 'potion:level'- Parameters:
potion
- the string- Returns:
- aa PotionWrapper if valid, otherwise null
-
getPotionNames
-