Package dev.sefiraat.sefilib.misc
Class ParticleUtils
java.lang.Object
dev.sefiraat.sefilib.misc.ParticleUtils
This class contains basic utility methods for creating particles
-
Method Summary
Modifier and TypeMethodDescriptionstatic voiddisplayParticleRandomly(Entity entity, double rangeRadius, int numberOfParticles, Particle.DustOptions dustOptions) Creates a dust particle effect at the provided locationstatic voiddisplayParticleRandomly(Entity entity, double rangeRadius, Particle.DustOptions dustOptions) Creates a dust particle effect at the provided locationstatic voiddisplayParticleRandomly(Entity entity, Particle particle, double rangeRadius) Creates 5 particle effects at the provided location with a random offsetstatic voiddisplayParticleRandomly(Entity entity, Particle particle, double rangeRadius, int numberOfParticles) Creates a particle effect at the provided locationstatic voiddisplayParticleRandomly(Location location, double rangeRadius, int numberOfParticles, Particle.DustOptions dustOptions) Creates a dust particle effect at the provided locationstatic voiddisplayParticleRandomly(Location location, Particle particle, double rangeRadius) Creates a particle effect at the provided locationstatic voiddisplayParticleRandomly(Location location, Particle particle, double rangeRadius, int numberOfParticles) Creates the specified amount of particle effects at the provided location with a random offsetstatic voiddrawCube(Particle.DustOptions dustOptions, Location corner1, Location corner2, double space) Draws a cubic shape of dust particles at the provided locationstatic voidDraws a cubic shape of particles at the provided locationstatic voiddrawCube(Particle particle, Location corner1, Location corner2, double particleDistance, Particle.DustOptions dustOptions) Draws a cubic shape of particles at the provided location https://www.spigotmc.org/threads/create-particles-in-cube-outline-shape.65991/static voiddrawLine(Particle.DustOptions dustOptions, Location start, Location end, double space) Creates a line of dust particles from the provided location to the provided target locationstatic voidCreates a line of particles from the provided location to the provided target locationstatic voiddrawLine(Particle particle, Location start, Location end, double space, Particle.DustOptions dustOptions) Creates a line of particles from the provided location to the provided target locationCreates a line ofLocations from the provided location to the provided target location
-
Method Details
-
displayParticleRandomly
@ParametersAreNonnullByDefault public static void displayParticleRandomly(Entity entity, Particle particle, double rangeRadius) Creates 5 particle effects at the provided location with a random offset- Parameters:
entity- The entity to create the particles aroundparticle- The particle to createrangeRadius- The radius of the area to create the particles in
-
displayParticleRandomly
@ParametersAreNonnullByDefault public static void displayParticleRandomly(Location location, Particle particle, double rangeRadius, int numberOfParticles) Creates the specified amount of particle effects at the provided location with a random offset- Parameters:
location- The location to create the particles aroundparticle- The particle to createrangeRadius- The radius of the area to create the particles innumberOfParticles- The amount of particles to create
-
displayParticleRandomly
@ParametersAreNonnullByDefault public static void displayParticleRandomly(Entity entity, Particle particle, double rangeRadius, int numberOfParticles) Creates a particle effect at the provided location- Parameters:
entity- The entity to create the particles aroundparticle- The particle to createrangeRadius- The radius of the area to create the particles innumberOfParticles- The amount of particles to create
-
displayParticleRandomly
@ParametersAreNonnullByDefault public static void displayParticleRandomly(Location location, Particle particle, double rangeRadius) Creates a particle effect at the provided location- Parameters:
location- The location to create the particles aroundparticle- The particle to createrangeRadius- The radius of the area to create the particles in
-
displayParticleRandomly
@ParametersAreNonnullByDefault public static void displayParticleRandomly(Entity entity, double rangeRadius, int numberOfParticles, Particle.DustOptions dustOptions) Creates a dust particle effect at the provided location- Parameters:
entity- The entity to create the particles aroundrangeRadius- The radius of the area to create the particles innumberOfParticles- The amount of particles to createdustOptions- The options for the dust particle
-
displayParticleRandomly
@ParametersAreNonnullByDefault public static void displayParticleRandomly(Location location, double rangeRadius, int numberOfParticles, Particle.DustOptions dustOptions) Creates a dust particle effect at the provided location- Parameters:
location- The location to create the particles aroundrangeRadius- The radius of the area to create the particles innumberOfParticles- The amount of particles to createdustOptions- The options for the dust particle
-
displayParticleRandomly
@ParametersAreNonnullByDefault public static void displayParticleRandomly(Entity entity, double rangeRadius, Particle.DustOptions dustOptions) Creates a dust particle effect at the provided location- Parameters:
entity- The entity to create the particles aroundrangeRadius- The radius of the area to create the particles industOptions- The options for the dust particle
-
drawLine
@ParametersAreNonnullByDefault public static void drawLine(Particle particle, Location start, Location end, double space) Creates a line of particles from the provided location to the provided target location- Parameters:
particle- The particle to createstart- The location to start the line fromend- The location to end the line atspace- The space between each particle
-
drawLine
@ParametersAreNonnullByDefault public static void drawLine(Particle particle, Location start, Location end, double space, @Nullable Particle.DustOptions dustOptions) Creates a line of particles from the provided location to the provided target location- Parameters:
particle- The particle to createstart- The location to start the line fromend- The location to end the line atspace- The space between each particledustOptions- The options for the dust particle
-
drawLine
@ParametersAreNonnullByDefault public static void drawLine(Particle.DustOptions dustOptions, Location start, Location end, double space) Creates a line of dust particles from the provided location to the provided target location- Parameters:
dustOptions- The options for the dust particlestart- The location to start the line fromend- The location to end the line atspace- The space between each particle
-
getLine
@Nonnull @ParametersAreNonnullByDefault public static List<Location> getLine(Location start, Location end, double space) Creates a line ofLocations from the provided location to the provided target location- Parameters:
start- The location to start the line fromend- The location to end the line atspace- The space between each location- Returns:
- A list of locations between the start and end location
-
drawCube
@ParametersAreNonnullByDefault public static void drawCube(Particle particle, Location corner1, Location corner2, double space) Draws a cubic shape of particles at the provided location- Parameters:
particle- The particle to createcorner1- The first corner of the cubecorner2- The second corner of the cubespace- The space between each particle
-
drawCube
@ParametersAreNonnullByDefault public static void drawCube(Particle particle, Location corner1, Location corner2, double particleDistance, @Nullable Particle.DustOptions dustOptions) Draws a cubic shape of particles at the provided location https://www.spigotmc.org/threads/create-particles-in-cube-outline-shape.65991/- Parameters:
particle- The particle to createcorner1- The first corner of the cubecorner2- The second corner of the cubeparticleDistance- The distance between each particledustOptions- The options for the dust particle
-
drawCube
@ParametersAreNonnullByDefault public static void drawCube(Particle.DustOptions dustOptions, Location corner1, Location corner2, double space) Draws a cubic shape of dust particles at the provided location- Parameters:
dustOptions- The options for the dust particlecorner1- The first corner of the cubecorner2- The second corner of the cubespace- The space between each particle
-