Skip to content

revqz1/ParticleAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ParticleAPI

ParticleAPI is a performance-focused library for Minecraft (Spigot/Paper 1.21+) that handles particle math and scheduling so you don't have to.

Its main purpose is to let developers create complex effects—like beams, spheres, and helixes—with a single line of code, while automatically managing performance (rate limiting and view distance).

Features

  • Zero Math: Pre-built shapes (Circle, Sphere, Helix, Beam).
  • Performance: Built-in rate limiter prevents server lag by capping particles per tick.
  • Smart Rendering: Only sends packets to players who are actually close enough to see them.
  • RGB Support: Simple .color(r, g, b) support for Redstone/Dust particles.

How to Use

Installation

  1. Admins: Drop ParticleAPI.jar into your /plugins/ folder and restart.
  2. Developers: Add the jar to your project build path or use Maven:
<dependency>
    <groupId>me.revqz</groupId>
    <artifactId>ParticleAPI</artifactId>
    <version>1.0-SNAPSHOT</version>
    <scope>provided</scope>
</dependency>

Java API Examples

1. Create a Circle

ParticleAPI.circle()
    .center(location)
    .radius(2.0)
    .points(30) // Density
    .play();

2. Shoot a Laser Beam

ParticleAPI.beam()
    .from(player.getEyeLocation())
    .to(targetLocation)
    .step(0.5) // Space between particles
    .play();

3. Colored Sphere (Red)

// Automatically uses DUST particle when color is applied
ParticleAPI.sphere()
    .center(location)
    .radius(1.5)
    .color(255, 0, 0)
    .play();

4. Simple Spawn (No Builder)

ParticleAPI.spawn(location, Particle.VILLAGER_HAPPY);

Commands

Useful for testing effects in-game.

  • /particles circle [r] [g] [b]
  • /particles sphere [r] [g] [b]
  • /particles helix
  • /particles beam

Example: /particles sphere 0 255 0 (Spawns a green sphere)

Configuration

Located in plugins/ParticleAPI/config.yml:

settings:
  max-particles-per-tick: 2000  # Hard limit to prevent crashes
  default-view-distance: 32     # Optimization range

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages