Interface ParticleTypeColor


public interface ParticleTypeColor

Class used to represent particle type that needs a color and transparency settings.

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 Type
    Method
    Description
    color(int r, int g, int b)
    Selects a fully visible color this particle should get.
    color(int r, int g, int b, int alpha)
    Selects a color and transparency this particle should get.
    color(org.bukkit.Color color)
    Selects a fully visible color this particle should get.
    color(org.bukkit.Color color, int alpha)
    Selects a color and transparency this particle should get.
    boolean
    Checks if this particle is supported by this Spigot version.
  • Method Details

    • color

      ParticleType color(org.bukkit.Color color)

      Selects a fully visible color this particle should get.

      Parameters are not validated in any way.

      Parameters:
      color - a Color object representing desired particle color.
      Returns:
      a valid shared ParticleType object with selected color.
    • color

      ParticleType color(org.bukkit.Color color, int alpha)

      Selects a color and transparency this particle should get.

      Parameters are not validated in any way.

      Parameters:
      color - a Color object representing desired particle color.
      alpha - alpha value that should be between 0 and 255; controls transparency of the particle.
      Returns:
      a valid shared ParticleType object with selected color.
    • color

      ParticleType color(int r, int g, int b)

      Selects a fully visible color this particle should get.

      Parameters are not validated in any way.

      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.
      Returns:
      a valid shared ParticleType object with selected color.
    • color

      ParticleType color(int r, int g, int b, int alpha)

      Selects a color and transparency 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.
      Returns:
      a valid shared ParticleType object 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.