Class CuboidParticleEffect


public class CuboidParticleEffect extends VelocityParticleEffect
A particle effect that draws the outline of a cuboid region
  • Constructor Details

    • CuboidParticleEffect

      public CuboidParticleEffect()
      Creates this effect with x, y, and z statically initialized to 1, and rotation initialized as 0.
    • CuboidParticleEffect

      protected CuboidParticleEffect(org.bukkit.configuration.ConfigurationSection section, WbsSettings settings, String directory)
      Create this effect from a ConfigurationSection, logging errors in the given settings
      Parameters:
      section - The section where this effect is defined
      settings - The settings to log errors against
      directory - The path taken through the config to get to this point, for logging purposes
  • Method Details

    • clone

      public CuboidParticleEffect clone()
      Specified by:
      clone in class WbsParticleEffect
    • refreshProviders

      protected void refreshProviders()
      Description copied from class: WbsParticleEffect
      Refresh all providers for this object. Subclasses may override this, but should call super.refreshProviders() at the start of the method
      Overrides:
      refreshProviders in class VelocityParticleEffect
    • build

      public CuboidParticleEffect build()
      Description copied from class: WbsParticleEffect
      Generate the particle set based on current settings. Call this before the first time it is run, or call buildAndRun each time to run based on current settings.
      Specified by:
      build in class WbsParticleEffect
      Returns:
      The same object.
    • configureBlockOutline

      public org.bukkit.Location configureBlockOutline(org.bukkit.Location corner1, org.bukkit.Location corner2)
      Configure this effect to outline the cuboid region defined by corner1, corner2 and return the location to play at to center on those blocks.
      Parameters:
      corner1 - The first corner of the cuboid region
      corner2 - The second corner of the cuboid region
      Returns:
      A location that, when used in VelocityParticleEffect.play(Particle, Location), will make this effect outline the cuboid region defined
    • setScaleAmount

      public CuboidParticleEffect setScaleAmount(boolean scaleAmount)
      Set whether or not to use the "amount" field as points-per-block
      Parameters:
      scaleAmount - True to make amount be points-per-block
      Returns:
      The same particle effect
    • setX

      public CuboidParticleEffect setX(double x)
      Set the size of the region in the X axis
      Parameters:
      x - The new size in the X axis
      Returns:
      The same particle effect
    • setY

      public CuboidParticleEffect setY(double y)
      Set the size of the region in the Y axis
      Parameters:
      y - The new size in the Y axis
      Returns:
      The same particle effect
    • setZ

      public CuboidParticleEffect setZ(double z)
      Set the size of the region in the Z axis
      Parameters:
      z - The new size in the Z axis
      Returns:
      The same particle effect
    • setX

      Set the provider for the region in the X axis
      Parameters:
      x - The new size in the X axis
      Returns:
      The same particle effect
    • setY

      Set the size of the region in the Y axis
      Parameters:
      y - The new size in the Y axis
      Returns:
      The same particle effect
    • setZ

      Set the size of the region in the Z axis
      Parameters:
      z - The new size in the Z axis
      Returns:
      The same particle effect
    • setXYZ

      public CuboidParticleEffect setXYZ(double size)
      Set the size of the region in the all 3 axes, making the region a cube
      Parameters:
      size - The new size in the all axes
      Returns:
      The same particle effect
    • setXYZ

      public CuboidParticleEffect setXYZ(NumProvider size)
      Set the provider to be used for all
      Parameters:
      size - The new size in the all axes
      Returns:
      The same particle effect
    • setXYZ

      public CuboidParticleEffect setXYZ(org.bukkit.util.Vector xyz)
      Set the size of the region in each axis defined by the X, Y, and Z components of a given vector
      Parameters:
      xyz - The vector representing the size of the region
      Returns:
      The same particle effect
    • setRotation

      public CuboidParticleEffect setRotation(double rotation)
      Parameters:
      rotation - The rotation in degrees
      Returns:
      The same particle effect
    • setRotation

      public CuboidParticleEffect setRotation(NumProvider rotation)
      Set the rotation provider directly
      Parameters:
      rotation - The rotation in degrees
      Returns:
      The same particle effect
    • setAbout

      public CuboidParticleEffect setAbout(org.bukkit.util.Vector about)
      Parameters:
      about - The vector about which to rotate
      Returns:
      The same particle effect
    • setAbout

      public CuboidParticleEffect setAbout(VectorProvider about)
      Set the about vector provider directly
      Parameters:
      about - The vector about which to rotate
      Returns:
      The same particle effect
    • writeToConfig

      public void writeToConfig(org.bukkit.configuration.ConfigurationSection section, String path)
      Description copied from class: WbsParticleEffect
      Overrides:
      writeToConfig in class VelocityParticleEffect
      Parameters:
      section - The section to write to
      path - The field/path inside the given section