# IParticleManager > Spawns Lectern's custom client-registered particles on a player's client, using the same semantics as the vanilla `/particle` command. This lets a server spawn particles that are only registered in the Lectern Fabric client's registry (e.g. `chronite_spark`), which the vanilla server-side `/particle` command cannot do, since the server has never heard of them. `gg.lode.lecternapi.api.manager.IParticleManager` --- ## Signature ```java public interface IParticleManager ``` --- ## Notes The particle key is the path of a particle registered under the `lectern` namespace on the client. Currently available keys: - `chronite_spark` (small glowing amber spark - `explosion_spark`) debris spark fragment - `explosion_smoke` (slow smoke puff - `explosion_shockwave_inner`) inner ground shockwave ring - `explosion_shockwave_outer` (outer ground shockwave ring Visual only) no entity, block, or world state is affected. --- ## Methods ### spawnParticle ```java void spawnParticle(Player player, String particle, double x, double y, double z, double deltaX, double deltaY, double deltaZ, double speed, int count) void spawnParticle(Player player, String particle, Location location, double deltaX, double deltaY, double deltaZ, double speed, int count) ``` Spawns a Lectern particle on the player's client, mirroring vanilla `/particle` semantics. Convenience overload using a Bukkit `Location` for the spawn centre. --- ### spawnLightning ```java void spawnLightning(Player player, String id, double x1, double y1, double z1, double x2, double y2, double z2, int durationTicks, float width, int argb) void spawnLightning(Player player, Location from, Location to) void spawnLightning(Player player, String id, Entity from, double fromOffsetX, double fromOffsetY, double fromOffsetZ, Entity to, double toOffsetX, double toOffsetY, double toOffsetZ, int durationTicks, float width, int argb) void spawnLightning(Player player, String id, Entity from, double x, double y, double z, int durationTicks, float width, int argb) void spawnLightning(Player player, String id, double x, double y, double z, Entity to, int durationTicks, float width, int argb) void spawnLightning(Player player, Entity from, Entity to) void spawnLightning(Player player, Entity from, Location to) ``` Strikes a lightning bolt between two world points on the player's client, a jagged, crackling arc that re-rolls its path every couple of ticks, glowing yellow by default. Purely visual: no damage, no fire, no entity. Yellow flash between two locations, default look. Lightning strung from one entity to another. Both ends track their entity on the client every couple of ticks, the arc follows movement with no further packets. Anchored at the chest (55% of height); `0,0,0` offsets put it there exactly. While an endpoint's entity isn't visible to the client (unloaded, dead, other dimension), the bolt hides but keeps aging. Lightning from an entity's chest to a fixed point. Lightning from a fixed point to an entity's chest. Yellow flash between two entities, default look. Yellow flash from an entity to a location, default look. --- ### removeLightning ```java void removeLightning(Player player, String id) ``` Removes a named lightning bolt before its lifetime ends. | Parameter | Type | |---|---| | `player` | `Player` | | `id` | `String` | --- ### clearLightning ```java void clearLightning(Player player) ``` Removes every lightning bolt on the player's client. | Parameter | Type | |---|---| | `player` | `Player` | --- ## Example Spawn one of Lectern's own particles for a single player. The arguments read like `/particle`: position, then spread, then speed and count. ```java IParticleManager particles = LecternAPI.getApi().getParticleManager(); particles.spawnParticle(player, "chronite_spark", player.getLocation(), 0.3, 0.3, 0.3, 0.02, 40); ``` Lightning is a beam between two points that lives for a while, so it takes an id you can use to clear it early: ```java // Between two entities, and it follows them. particles.spawnLightning(player, caster, victim); // Or between two fixed points, with your own id, lifetime, width and colour. particles.spawnLightning(player, "tether", 100, 70, 200, 108, 70, 204, 40, 0.25f, 0xFF66CCFF); particles.removeLightning(player, "tether"); ``` --- ## Related Pages - [[IEffekManager]]. Effekseer effects, for anything bigger than a particle