Mineuniverse
Log in Register
Plugins

EffectLib

Grants developers access to a library of various effects.
by _ForgeUser6668601
Download Claim this project
534,798 downloads
0 likes
Updated Jun 30, 2026
0 hypes
Developer Tools Fun Miscellaneous

EffectLib

Wiki https://github.com/elBukkit/EffectLib/wiki

Support on Discordhttps://discord.gg/fWJ3W3kMjG

Forum (Outdated): http://forums.bukkit.org/threads/effectlib-manage-your-effects-the-nice-way.259879/

Description

THIS PLUGIN HAS NO USE FOR SERVER-OWNERS

This library is a possibility for developers to out-source their effect-managment. This library comes with a handy collection of customizable effects, but you can easily add your own effects and manage them in the library.

Usage

  1. See documentation for Maven-based instructions.
  2. OR Add the EffectLib.jar to you project and to the plugins in your server.
  3. Create a new EffectManager to handle your effects.
    EffectManager em = new EffectManager(plugin);
    
  4. Create a new Effect and start it.
    Effect effect = new BleedEffect(em); effect.setEntity(target); effect.start();
    
  5. Dispose of the EffectManager after when you are completely done with it.
    em.dispose();
    

Demo

This demo creates a bleed-effect when a player joins. After 15 seconds, the effect runs out and the callback is called, that kills the player and sends them a message.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package com.yourdomain.yourplugin;

import org.bukkit.Bukkit;
import org.bukkit.event.EventHandler;
import org.bukkit.event.HandlerList;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.plugin.java.JavaPlugin;

import de.slikey.effectlib.EffectManager;
import de.slikey.effectlib.effect.BleedEffect;

public class EffectLibTest extends JavaPlugin implements Listener {
    private EffectManager effectManager;

    @Override
    public void onEnable() {
        Bukkit.getPluginManager().registerEvents(this, this);

        // Initialize a new EffectManager
        effectManager = new EffectManager(this);
    }

    @Override
    public void onDisable() {
        // Dispose of the EffectManager
        effectManager.dispose();
        HandlerList.unregisterAll((Listener) this);
    }

    @EventHandler
    public void onPlayerJoin(final PlayerJoinEvent event) {
        // Create the Effect and attach it to the Player
        BleedEffect bleedEffect = new BleedEffect(effectManager);
        bleedEffect.setEntity(event.getPlayer());

        // Add a callback to the effect
        bleedEffect.callback = new Runnable() {

            @Override
            public void run() {
                event.getPlayer().sendMessage("You bled out..");
                event.getPlayer().setHealth(0d);
            }

        };
        // Bleeding takes 15 seconds
        // period * iterations = time of effect
        bleedEffect.iterations = 15 * 20;
        bleedEffect.start();
    }
}

Effects Control

All effects can attach to a Location (setLocation) or an Entity (setEntity). Some Effects (like LineEffect) can work with two locations- use setTargetEntity and setTarget to control the "second point".

You can cancel all running effects of an EffectManager by cancel(boolean callback).

Configuration-Driven Effects

There is also a Configuration-driven interface you may use, EffectManager.start.

You may pass in the Effect class as a String, and additional parameters as a ConfigurationSection. This can be a fully-qualified path (for custom externally-defined Effects) or a simple class name for the builtin classes. For example:

summon:
 class: VortexEffect
 iterations: 4
 particle: smoke
 helixes: 16
 circles: 7
 grow: 0.1
 radius: 1

And then to use it, something like this:

ConfigurationSection effectConfig = getConfig().getConfigurationSection("summon");
String clasName = effectConfig.getString("class");
effectManager.start(className, effectConfig, player);

There are several different versions of the start() method as of 3.4, the longest one would look like this:

effectManager.start(className, effectConfig, player.getLocation(), player, null, null, null);

The latter three parameters are optional, the two "target" parameters used only in certain FX. The last line can be used for the TextEffect to have parameterizable text messages- for instance, if you wish to insert the Player's name in a Configuration-drive text message.

Current Effects

  • ArcEffect - Create architectual correct arc of particles
  • AtomEffect - Create the orbital-model of the atom
  • BigBangEffect - Create a large cluster of fireworks.
  • BleedEffect - Let the target entity bleed.
  • ConeEffect - Cast a cone in all possible directions
  • EarthEffect - Create a model of the Earth
  • DnaEffect - Create DNA molecule
  • ExplodeEffect - Create a explosion at location.
  • FlameEffect - Let the target entity burn.
  • FountainEffect - Create a foundtain for you well
  • GridEffect - Customizable grid for you signwall
  • HelixEffect - Create a customizable static helix.
  • JumpEffect - Forces an entity to jump naturally.
  • LineEffect - Draw line from A to B
  • LoveEffect - The target entity is in love.
  • MusicEffect - Circle of notes appeares above the entity.
  • MusicEffect - Circle of notes appeares at a location.
  • ShieldEffect - Spherical Shield around an entity.
  • SkyRocketEffect - Foces an entity to fly into the sky.
  • SmokeEffect - Let the target entity smoke.
  • StarEffect - Create fully customizable 3D star
  • TextEffect - Create particle-text with custom font, size and text
  • TraceEffect - Create a trace along an entitys path.
  • TurnPlayerEffect - Forces the player to turn in a circle.
  • VortexEffect - Create a vortex of particles at location
  • WarpEffect - Create a warp-effect around an entity
  • WaveEffect - Create waves with surf.
  • Feel free to send me your effects if you have coded up some custom ones of your own!

All effects have the ability to be changed. Let the effect repeat, increase duration or change period of iterations.

Any Effect will work when attached to a static location, or to an Entity. If both are provided, it will attach at the target Location, but move relative to that along with the entity (great for tagging hit locations, or attaching to an Entity's head or other body part specifically!)

Source

Get the source on GitHub!

 

https://github.com/elBukkit/EffectLib

EffectLib 10.12
MC 1.20.6, 1.21.2, 1.21, 1.21.3, 1.20.2, 1.21.8, 1.20, 1.20.4, 1.21.4, 1.20.5, 1.21.5, 1.20.1, 1.20.3, 1.21.7, 1.21.1, 1.21.6, 1.19.4, 1.21.9, 1.21.10, 1.21.11
Release 2026-03-11 Get
EffectLib 9.0
MC 1.9, 1.16, 1.14, 1.11, 1.12, 1.10, 1.15, 1.13
Release 2021-03-30 Get
EffectLib 6.4
MC 1.9, 1.16, 1.11, 1.14, 1.13, 1.12, 1.10, 1.15
Release 2020-11-10 Get
EffectLib 6.2
MC 1.9, 1.11, 1.14, 1.13, 1.12, 1.10
Release 2019-09-24 Get
EffectLib 6.1
MC 1.9, 1.11, 1.12, 1.10
Release 2018-08-10 Get
EffectLib 6.0
MC 1.9, 1.11, 1.12, 1.10
Release 2018-07-23 Get
EffectLib 5.9
MC 1.9, 1.11, 1.8.1, 1.8, 1.12, 1.10
Release 2018-03-29 Get
EffectLib 5.8
MC 1.9, 1.11, 1.8.1, 1.8, 1.12, 1.10
Release 2018-03-16 Get
EffectLib 5.7
MC 1.9, 1.11, 1.8.1, 1.8, 1.12, 1.10
Release 2018-03-12 Get
EffectLib 5.5
MC 1.9, 1.11, 1.12, 1.10
Release 2017-10-11 Get
EffectLib 5.4
MC 1.9, 1.11, 1.10
Release 2017-03-10 Get
EffectLib 5.2
MC 1.9, 1.10
Release 2016-11-17 Get
EffectLib 5.1
MC 1.9, 1.10
Release 2016-10-24 Get
EffectLib 5.0
MC 1.9, 1.10
Release 2016-06-09 Get
EffectLib 4.2
MC 1.9, 1.8.1, 1.8
Release 2016-03-28 Get
EffectLib 4.1
MC 1.9, 1.8.1, 1.8
Release 2016-03-06 Get
EffectLib 4.0
MC 1.8.1, 1.8
Release 2016-03-01 Get
EffectLib 3.8
MC CB 1.7.9-R0.2, 1.8, CB 1.7.2-R0.3
Release 2015-12-04 Get
EffectLib 3.7
MC 1.7.4, 1.8
Release 2015-10-27 Get
EffectLib 3.6
MC CB 1.7.9-R0.2, 1.8.1, CB 1.7.2-R0.3
Release 2015-10-19 Get
EffectLib 3.5
MC CB 1.7.9-R0.2, 1.8, CB 1.7.2-R0.3
Release 2015-10-14 Get
EffectLib 3.4
MC CB 1.7.9-R0.2, 1.7.4, 1.8.1
Release 2015-06-25 Get
EffectLib 3.2
MC CB 1.7.9-R0.2, 1.8, CB 1.7.2-R0.3
Release 2015-04-22 Get
EffectLib 3.0
MC 1.7.4, 1.8.1, 1.6.4
Release 2015-01-16 Get
v2.0
MC 1.7.2, CB 1.7.9-R0.2, 1.7.4
Release 2014-08-18 Get
EffectLib 1.6
MC 1.7.4, 1.6.4, CB 1.7.9-R0.1
Release 2014-07-09 Get
v1.5-SNAPSHOT
MC CB 1.7.2-R0.3
Release 2014-07-01 Get
v1.4
MC CB 1.7.2-R0.3
Release 2014-04-27 Get
v1.2
MC CB 1.7.2-R0.3
Release 2014-04-26 Get
v1.1
MC CB 1.7.2-R0.3
Release 2014-04-24 Get
v1.0
MC CB 1.7.2-R0.3
Release 2014-04-23 Get
v0.3-BETA
MC CB 1.7.2-R0.3
Beta 2014-04-22 Get
v0.5-BETA
MC CB 1.7.2-R0.3
Release 2014-04-22 Get
v0.4-BETA
MC CB 1.7.2-R0.3
Beta 2014-04-22 Get
v0.2-BETA
MC CB 1.7.2-R0.3
Beta 2014-04-21 Get
v0.1-ALPHA
MC CB 1.7.2-R0.3
Alpha 2014-04-21 Get

More from _ForgeUser6668601

OneWayNether
1,108

You Might Also Like

WorldGuard Custom Flags
WorldGuard Custom Flags
97,851
HoloAPI
Advanced and powerful holographic displays
93,959
Minequery
Minequery
91,099
SQLibrary
SQLibrary aims to streamline driver wrappers in Java for every database engine
85,675
WolfyUtilities
Utils and APIs: Config, Language and Inventory API, Protection Utils: WorldGuard, LWC, PlotSquared
84,728
DisguiseTester
Experiment with disguises!
9,677