Class PotionHelper

java.lang.Object
fr.andross.banitem.utils.potions.PotionHelper

public abstract class PotionHelper extends Object
A potion helper class to retrieve correct Bukkit PotionEffectType object across versions.
Version:
3.1.1
Author:
Andross
  • Method Details

    • getPotionEffectType

      @Nullable public static @Nullable org.bukkit.potion.PotionEffectType getPotionEffectType(@NotNull @NotNull String name)
      Try to get a PotionEffectType object by the name.
      Parameters:
      name - name of the potion effect type
      Returns:
      the bukkit PotionEffectType, null if not found
    • getPotionWrapper

      @Nullable public static @Nullable PotionWrapper getPotionWrapper(@NotNull @NotNull String potion)
      Try to get a PotionWrapper from a string which syntax must be 'potion:level'.
      Parameters:
      potion - the string
      Returns:
      aa PotionWrapper if valid, otherwise null
    • getPotionNames

      @NotNull public static @NotNull List<String> getPotionNames()
      Get the name of the potions.
      Returns:
      the name of the potions