Class ParticleEffect.OrdinaryColor
- java.lang.Object
-
- com.massivecraft.factions.util.Particles.ParticleEffect.ParticleColor
-
- com.massivecraft.factions.util.Particles.ParticleEffect.OrdinaryColor
-
- Enclosing class:
- ParticleEffect
public static final class ParticleEffect.OrdinaryColor extends ParticleEffect.ParticleColor
Represents the color for effects likeParticleEffect.SPELL_MOB
,ParticleEffect.SPELL_MOB_AMBIENT
andParticleEffect.NOTE
This class is part of the ParticleEffect Library and follows the same usage conditions- Since:
- 1.7
-
-
Constructor Summary
Constructors Constructor Description OrdinaryColor(int red, int green, int blue)
Construct a new ordinary colorOrdinaryColor(org.bukkit.Color color)
Construct a new ordinary color
-
Method Summary
Modifier and Type Method Description int
getBlue()
Returns the blue value of the RGB formatint
getGreen()
Returns the green value of the RGB formatint
getRed()
Returns the red value of the RGB formatfloat
getValueX()
Returns the red value divided by 255float
getValueY()
Returns the green value divided by 255float
getValueZ()
Returns the blue value divided by 255
-
-
-
Constructor Detail
-
OrdinaryColor
public OrdinaryColor(int red, int green, int blue) throws java.lang.IllegalArgumentException
Construct 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
-
OrdinaryColor
public OrdinaryColor(org.bukkit.Color color)
Construct a new ordinary color- Parameters:
color
- Bukkit color
-
-
Method Detail
-
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:
getValueX
in classParticleEffect.ParticleColor
- Returns:
- The offsetX value
-
getValueY
public float getValueY()
Returns the green value divided by 255- Specified by:
getValueY
in classParticleEffect.ParticleColor
- Returns:
- The offsetY value
-
getValueZ
public float getValueZ()
Returns the blue value divided by 255- Specified by:
getValueZ
in classParticleEffect.ParticleColor
- Returns:
- The offsetZ value
-
-