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
-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable org.bukkit.potion.PotionEffectType
getPotionEffectType
(@NotNull String name) Try to get aPotionEffectType
object by the name.Get the name of the potions.static @Nullable PotionWrapper
getPotionWrapper
(@NotNull String potion) Try to get aPotionWrapper
from a string which syntax must be 'potion:level'.
-
Method Details
-
getPotionEffectType
@Nullable public static @Nullable org.bukkit.potion.PotionEffectType getPotionEffectType(@NotNull @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 syntax must be 'potion:level'.- Parameters:
potion
- the string- Returns:
- aa PotionWrapper if valid, otherwise null
-
getPotionNames
Get the name of the potions.- Returns:
- the name of the potions
-