Class ParticleText

All Implemented Interfaces:
Shape

public class ParticleText extends ParticleShaper
  • Field Details

    • rng

      protected final ThreadLocalRandom rng
    • text

      protected final List<String> text
    • font

      protected Font font
    • xRadius

      protected double xRadius
    • zRadius

      protected double zRadius
    • inverted

      protected boolean inverted
    • centered

      protected boolean centered
    • borderX

      protected int borderX
    • borderZ

      protected int borderZ
    • image

      protected BufferedImage image
    • remakeImage

      protected boolean remakeImage
    • width

      protected int width
    • height

      protected int height
    • startX

      protected int startX
    • startZ

      protected int startZ
  • Constructor Details

    • ParticleText

      public ParticleText(Particle particle, LocationSafe center, double xRadius, double zRadius, int particleFrequency, String... text)
    • ParticleText

      public ParticleText(Particle particle, LocationSafe center, double xRadius, double zRadius, String... text)
    • ParticleText

      public ParticleText(Particle particle, LocationSafe center, double radius, int particleFrequency, String... text)
    • ParticleText

      public ParticleText(Particle particle, LocationSafe center, double radius, String... text)
  • Method Details

    • display

      public void display()
      Specified by:
      display in interface Shape
      Specified by:
      display in class ParticleShaper
    • clone

      public ParticleText clone()
      Specified by:
      clone in interface Shape
      Overrides:
      clone in class ParticleShaper
    • cloneConstructor

      protected ParticleShaper cloneConstructor()
      Specified by:
      cloneConstructor in class ParticleShaper
    • scale

      public void scale(double x, double y, double z)
      Description copied from interface: Shape
      Rescales this shape such that a shape with the xyz radiuses of 4, 3, 4, resized by 1.25, 1.25, 1.25, would have its radiuses become 5, 3.75, 5.
      Specified by:
      scale in interface Shape
      Overrides:
      scale in class RotationHandler
      Parameters:
      x - x scale
      y - y scale
      z - z scale
    • remakeImage

      protected void remakeImage()
    • addLines

      public void addLines(int index, String... strings)
    • addLines

      public void addLines(String... strings)
    • removeLine

      public void removeLine(int line)
    • setFont

      public ParticleText setFont(Font font)
    • setLine

      public void setLine(int line, String text)
    • setCenter

      public void setCenter(LocationSafe center)
    • setXRadius

      public void setXRadius(double xRadius)
    • setZRadius

      public void setZRadius(double zRadius)
    • setInverted

      public ParticleText setInverted(boolean inverted)
      Parameters:
      inverted - whether particles should appear within the text or outlining the text, default false
    • setCentered

      public ParticleText setCentered(boolean centered)
      Parameters:
      centered - whether the text should be centered or not, default true
    • setBorderX

      public ParticleText setBorderX(int borderX)
      Parameters:
      borderX - how wide the border around the text should be, only used if isInverted() is true.
    • setBorderZ

      public ParticleText setBorderZ(int borderZ)
      Parameters:
      borderZ - how tall the border around the text should be, only used if isInverted() is true.
    • getFont

      public Font getFont()
    • getLine

      public String getLine(int line)
    • getCenter

      public org.bukkit.Location getCenter()
    • getXRadius

      public double getXRadius()
    • getZRadius

      public double getZRadius()
    • isInverted

      public boolean isInverted()
      Returns:
      whether particles should appear within the text or outlining the text, default false
    • isCentered

      public boolean isCentered()
      Returns:
      whether the text should be centered or not, default true
    • getBorderX

      public int getBorderX()
      Returns:
      how wide the border around the text should be, only used if isInverted() is true.
    • getBorderZ

      public int getBorderZ()
      Returns:
      how tall the border around the text should be, only used if isInverted() is true.
    • getText

      public String[] getText()
    • getLineAmount

      public int getLineAmount()