Interface ParticleTypeSpell
Class used to represent particle type that needs a color, transparency settings and power.
It provides a non-reflective color method overloads
to construct ParticleType with selected color.
All color methods does not validate parameters in any way.
IMPORTANT NOTE: All methods annotated with Shared annotation
caches and returns exactly one and the same instance with changed state between method calls.
For an independent copy of returned instances, check detachCopy methods on them.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if this particle is supported by this Spigot version.spell(int r, int g, int b, int alpha, double power) Selects a color, transparency and power this particle should get.spell(org.bukkit.Color color, int alpha, double power) Selects a color, transparency and power this particle should get.
-
Method Details
-
spell
Selects a color, transparency and power this particle should get.
Parameters are not validated in any way.
- Parameters:
color- aColorobject representing desired particle color.alpha- alpha value that should be between 0 and 255; controls transparency of the particle.power- a power which this particle should have.- Returns:
- a valid shared
ParticleTypeobject with selected color.
-
spell
Selects a color, transparency and power this particle should get.
Parameters are not validated in any way.
This method is overridden by dynamically generated subclasses.
- Parameters:
r- red color value that should be between 0 and 255.g- green color value that should be between 0 and 255.b- blue color value that should be between 0 and 255.alpha- alpha value that should be between 0 and 255; controls transparency of the particle.power- a power which this particle should have.- Returns:
- a valid shared
ParticleTypeobject with selected color.
-
isPresent
boolean isPresent()Checks if this particle is supported by this Spigot version.
This method is overridden by dynamically generated subclasses.
- Returns:
- true if this particle is supported by this Spigot version, false otherwise.
-