Enum Class ParticleColor

java.lang.Object
java.lang.Enum<ParticleColor>
org.strassburger.lifestealz.util.customblocks.ParticleColor
All Implemented Interfaces:
Serializable, Comparable<ParticleColor>, Constable

public enum ParticleColor extends Enum<ParticleColor>
Enum representing different particle colors with their RGB bounds. Each color can generate a random color within its defined RGB bounds.
  • Enum Constant Details

  • Method Details

    • values

      public static ParticleColor[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ParticleColor valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getColor

      public org.bukkit.Color getColor()
      Generates a random color within the RGB bounds of this ParticleColor.
      Returns:
      a Color object with random RGB values within the defined bounds
    • fromString

      public static ParticleColor fromString(String colorName)
      Returns a ParticleColor based on the given color name. If the color name does not match any ParticleColor, it returns WHITE.
      Parameters:
      colorName - the name of the color
      Returns:
      the corresponding ParticleColor or WHITE if not found