Class VelocityParticleEffect

java.lang.Object
wbs.utils.util.particles.WbsParticleEffect
wbs.utils.util.particles.VelocityParticleEffect
Direct Known Subclasses:
CircleParticleEffect, CuboidParticleEffect

public abstract class VelocityParticleEffect extends WbsParticleEffect
A superclass for particle effects that can have speed set in specific directions
  • Field Details

  • Constructor Details

    • VelocityParticleEffect

      public VelocityParticleEffect()
    • VelocityParticleEffect

      public VelocityParticleEffect(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

    • 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 WbsParticleEffect
    • cloneInto

      protected VelocityParticleEffect cloneInto(VelocityParticleEffect cloned)
    • play

      public VelocityParticleEffect play(org.bukkit.Particle particle, org.bukkit.Location loc, org.bukkit.entity.Player player)
      Description copied from class: WbsParticleEffect
      Run the effect pattern at the given location with the given particle. For shapes needing two locations (such as Line), a random second location will be chosen a random number of blocks away from the given location.
      Specified by:
      play in class WbsParticleEffect
      Parameters:
      particle - The particle type to use
      loc - The location at which to run the effect.
      player - The only play who will see it
      Returns:
      The same object.
    • play

      public VelocityParticleEffect play(org.bukkit.Particle particle, org.bukkit.Location loc)
      Description copied from class: WbsParticleEffect
      Run the effect pattern at the given location with the given particle. For shapes needing two locations (such as Line), a random second location will be chosen a random number of blocks away from the given location.
      Specified by:
      play in class WbsParticleEffect
      Parameters:
      particle - The particle type to use
      loc - The location at which to run the effect.
      Returns:
      The same object.
    • getSpeed

      public double getSpeed()
    • getSpeedProvider

      public NumProvider getSpeedProvider()
    • setSpeed

      public VelocityParticleEffect setSpeed(double speed)
    • setSpeed

      public VelocityParticleEffect setSpeed(NumProvider speed)
    • getDirection

      public org.bukkit.util.Vector getDirection()
    • getDirectionProvider

      public VectorProvider getDirectionProvider()
    • setDirection

      public VelocityParticleEffect setDirection(org.bukkit.util.Vector direction)
    • setDirection

      public VelocityParticleEffect setDirection(VectorProvider direction)
    • getVariation

      public double getVariation()
    • getVariationProvider

      public NumProvider getVariationProvider()
    • setVariation

      public VelocityParticleEffect setVariation(double variation)
      Parameters:
      variation - The variation in direction when the particles have speed.
      Returns:
      The same object.
    • setVariation

      public VelocityParticleEffect setVariation(NumProvider variation)
      Parameters:
      variation - The variation in direction when the particles have speed.
      Returns:
      The same object.
    • getRelative

      public boolean getRelative()
      Returns:
      Whether or not the velocity is relative to the origin of the particle effect.
    • setRelative

      public VelocityParticleEffect setRelative(boolean relative)
      Parameters:
      relative - Whether or not this effect should be relative to the origin of the particle effect.
      Returns:
      The same object.
    • writeToConfig

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