https://github.com/mrmicky-fr/fastparticles
Lightweight particle API for Bukkit plugins, with 1.7.10 to 1.21 support.
https://github.com/mrmicky-fr/fastparticles
api bukkit minecraft particles spigot
Last synced: 11 months ago
JSON representation
Lightweight particle API for Bukkit plugins, with 1.7.10 to 1.21 support.
- Host: GitHub
- URL: https://github.com/mrmicky-fr/fastparticles
- Owner: MrMicky-FR
- License: mit
- Created: 2018-09-15T15:44:40.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-05-04T17:40:06.000Z (about 2 years ago)
- Last Synced: 2025-03-14T22:33:40.719Z (over 1 year ago)
- Topics: api, bukkit, minecraft, particles, spigot
- Language: Java
- Homepage:
- Size: 59.6 KB
- Stars: 47
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FastParticles
[](https://jitpack.io/#fr.mrmicky/FastParticles)
Lightweight particle API for Bukkit plugins, compatible with all Minecraft versions starting with 1.7.10!
> [!IMPORTANT]
> If you don't need 1.7/1.8 support, this library is not required, and you should just use the Bukkit methods [`Player#spawnParticle`](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/Player.html#spawnParticle(org.bukkit.Particle,org.bukkit.Location,int)) and [`World#spawnParticle`](https://hub.spigotmc.org/javadocs/spigot/org/bukkit/World.html#spawnParticle(org.bukkit.Particle,org.bukkit.Location,int)).
## Features
* Easy to use
* No reflection on compatible Bukkit versions
* Support all particle data on all versions for legacy particles
* Works on 1.13 and higher servers, with and without legacy particles
### Installation
#### Maven
```xml
org.apache.maven.plugins
maven-shade-plugin
3.3.0
package
shade
fr.mrmicky.fastparticles
com.yourpackage.fastparticles
jitpack.io
https://jitpack.io
fr.mrmicky
FastParticles
2.0.2
```
### Gradle
```groovy
plugins {
id 'com.gradleup.shadow' version '8.3.0'
}
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'fr.mrmicky:FastParticles:2.0.2'
}
```
### Manual (not recommended)
Copy all the classes in your plugin.
## Usage
### Spawning particles
Use a method from `FastParticle`:
```java
// Get a ParticleType
ParticleType flame = ParticleType.of("FLAME");
ParticleType redstone = ParticleType.of("REDSTONE");
ParticleType blockCrack = ParticleType.of("BLOCK_CRACK");
// Spawn particle for a player
flame.spawn(player, loc, 1);
// Spawn particle for all players in the world
flame.spawn(world, loc, 1);
// Spawn colored particle to a player
redstone.spawn(player, loc, 1, ParticleData.createDustOptions(Color.BLUE, 1));
// Spawn block crack particle to a player
blockCrack.spawn(player, loc, 1, ParticleData.createBlockData(Material.DIAMOND));
```
When you need to spawn a large number of particles, you can cache instances of `ParticleType` and `ParticleData` to slightly improve performances.