Class ColorableParticle

java.lang.Object
hm.zelha.particlesfx.particles.parents.Particle
hm.zelha.particlesfx.particles.parents.ColorableParticle
All Implemented Interfaces:
IParticle
Direct Known Subclasses:
ParticleDustColored, ParticleEffectColored, ParticleEffectTransparent

public abstract class ColorableParticle extends Particle
  • Field Details

    • color

      protected Color color
    • brightness

      protected int brightness
  • Constructor Details

    • ColorableParticle

      protected ColorableParticle(String particleID, @Nullable Color color, int brightness, double offsetX, double offsetY, double offsetZ, int count)
  • Method Details

    • inherit

      public ColorableParticle inherit(Particle particle)
      Specified by:
      inherit in interface IParticle
      Overrides:
      inherit in class Particle
      Parameters:
      particle - particle for this object to copy data from
      Returns:
      this object
    • clone

      public abstract ColorableParticle clone()
      Specified by:
      clone in interface IParticle
      Specified by:
      clone in class Particle
    • getXYZ

      protected org.bukkit.util.Vector getXYZ(org.bukkit.Location location)
      Description copied from class: Particle
      Meant to be overridden by child classes to modify the X/Y/Z values of the packet sent to the player.
      Overrides:
      getXYZ in class Particle
      Parameters:
      location - the location passed into the display method
      Returns:
      the xyzHelper with the modified X/Y/Z values
    • getOffsets

      protected org.bukkit.util.Vector getOffsets(org.bukkit.Location location)
      Description copied from class: Particle
      Meant to be overridden by child classes to modify the offset values of the packet sent to the player.
      Overrides:
      getOffsets in class Particle
      Parameters:
      location - the location passed into the display method
      Returns:
      the offsetHelper with the modified offset values
    • getPacketSpeed

      protected float getPacketSpeed()
      Description copied from class: Particle
      Meant to be overridden by child classes to modify the speed value of the packet sent to the player.
      Overrides:
      getPacketSpeed in class Particle
      Returns:
      the modified speed value
    • getPacketCount

      protected int getPacketCount()
      Description copied from class: Particle
      Meant to be overridden by child classes to modify the count value of the packet sent to the player.
      Overrides:
      getPacketCount in class Particle
      Returns:
      the modified count value
    • setColor

      public void setColor(@Nullable Color color)
      Parameters:
      color - color to set, null if you want random coloring
    • setColor

      public void setColor(int red, int green, int blue)
    • setBrightness

      public void setBrightness(int brightness)
      Parameters:
      brightness - how saturated the color should be, from 0-100
    • getColor

      @Nullable public Color getColor()
      nullable to allow for randomly colored particles without being complicated
      Returns:
      color this particle is using
    • getBrightness

      public int getBrightness()