Class OrdinaryColor
java.lang.Object
dev.esophose.playerparticles.particles.data.ParticleColor
dev.esophose.playerparticles.particles.data.OrdinaryColor
public final class OrdinaryColor extends ParticleColor
Represents the color for effects like
ParticleEffect.ENTITY_EFFECT,
ParticleEffect.AMBIENT_ENTITY_EFFECT and ParticleEffect.NOTE
This class is part of the ParticleEffect Library and follows the same usage conditions
- Since:
- 1.7
-
Field Summary
Fields Modifier and Type Field Description static OrdinaryColorRAINBOWstatic OrdinaryColorRANDOM -
Constructor Summary
Constructors Constructor Description OrdinaryColor(int red, int green, int blue)Construct a new ordinary color -
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object other)intgetBlue()Returns the blue value of the RGB formatintgetGreen()Returns the green value of the RGB formatintgetRed()Returns the red value of the RGB formatfloatgetValueX()Returns the red value divided by 255floatgetValueY()Returns the green value divided by 255floatgetValueZ()Returns the blue value divided by 255inthashCode()org.bukkit.ColortoSpigot()
-
Field Details
-
Constructor Details
-
OrdinaryColor
public OrdinaryColor(int red, int green, int blue) throws java.lang.IllegalArgumentExceptionConstruct a new ordinary color- Parameters:
red- Red value of the RGB formatgreen- Green value of the RGB formatblue- Blue value of the RGB format- Throws:
java.lang.IllegalArgumentException- If one of the values is lower than 0 or higher than 255
-
-
Method Details
-
getRed
public int getRed()Returns the red value of the RGB format- Returns:
- The red value
-
getGreen
public int getGreen()Returns the green value of the RGB format- Returns:
- The green value
-
getBlue
public int getBlue()Returns the blue value of the RGB format- Returns:
- The blue value
-
getValueX
public float getValueX()Returns the red value divided by 255- Specified by:
getValueXin classParticleColor- Returns:
- The offsetX value
-
getValueY
public float getValueY()Returns the green value divided by 255- Specified by:
getValueYin classParticleColor- Returns:
- The offsetY value
-
getValueZ
public float getValueZ()Returns the blue value divided by 255- Specified by:
getValueZin classParticleColor- Returns:
- The offsetZ value
-
equals
public boolean equals(java.lang.Object other)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
toSpigot
public org.bukkit.Color toSpigot()
-