Class PotionHelper

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

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

    • PotionHelper

      public PotionHelper()
  • Method Details

    • getPotionEffectType

      @Nullable public static org.bukkit.potion.PotionEffectType getPotionEffectType(@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 PotionWrapper getPotionWrapper(@NotNull String potion)
      Try to get a PotionWrapper from a string which synthax must be 'potion:level'
      Parameters:
      potion - the string
      Returns:
      aa PotionWrapper if valid, otherwise null
    • getPotionNames

      @NotNull public static List<String> getPotionNames()