Enum Class ParticleColor
- All Implemented Interfaces:
Serializable
,Comparable<ParticleColor>
,Constable
Enum representing different particle colors with their RGB bounds.
Each color can generate a random color within its defined RGB bounds.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic ParticleColor
fromString
(String colorName) Returns a ParticleColor based on the given color name.org.bukkit.Color
getColor()
Generates a random color within the RGB bounds of this ParticleColor.static ParticleColor
Returns the enum constant of this class with the specified name.static ParticleColor[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
WHITE
-
GRAY
-
RED
-
ORANGE
-
YELLOW
-
GREEN
-
BLUE
-
PURPLE
-
PINK
-
-
Method Details
-
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
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 nameNullPointerException
- 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
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
-