Class PotionUtilities

java.lang.Object
net.headmonitor.MonitorLibSpigot.utilities.PotionUtilities

public class PotionUtilities extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bukkit.Color
    potionDefaultColors(org.bukkit.potion.PotionEffectType potionEffectType)
    Returns the default color of a Potion based on the PotionEffectType provided.
    static net.kyori.adventure.text.Component
    potionEffectToReadable(org.bukkit.potion.PotionEffectType effect)
    Converts the given Potion Effect to its readable form as well as the correct Language.
    static org.bukkit.potion.PotionEffectType
    Returns the PotionEffectType based on the String provided.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PotionUtilities

      public PotionUtilities()
  • Method Details

    • potionEffectToReadable

      public static net.kyori.adventure.text.Component potionEffectToReadable(org.bukkit.potion.PotionEffectType effect)
      Converts the given Potion Effect to its readable form as well as the correct Language.
      Parameters:
      effect - The Potion Effect to convert.
      Returns:
      Returns a String of the given Material.
    • potionDefaultColors

      public static org.bukkit.Color potionDefaultColors(org.bukkit.potion.PotionEffectType potionEffectType)
      Returns the default color of a Potion based on the PotionEffectType provided.
      Parameters:
      potionEffectType - The Effect Type of the Potion.
      Returns:
      Returns the default Potion Color.
    • potionNameToPotionEffect

      @Nullable public static org.bukkit.potion.PotionEffectType potionNameToPotionEffect(String potionEffect)
      Returns the PotionEffectType based on the String provided.
      Parameters:
      potionEffect - The Effect Type String.
      Returns:
      Returns the PotionEffectType.