Skip to content

Commit

Permalink
Support for newer versions of Effectlib
Browse files Browse the repository at this point in the history
  • Loading branch information
TheComputerGeek2 committed Aug 10, 2018
1 parent 0c33970 commit e53980a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/com/nisovin/magicspells/MagicSpells.java
Expand Up @@ -28,6 +28,7 @@
import com.nisovin.magicspells.util.compat.CompatBasics; import com.nisovin.magicspells.util.compat.CompatBasics;
import com.nisovin.magicspells.util.compat.EventUtil; import com.nisovin.magicspells.util.compat.EventUtil;
import com.nisovin.magicspells.volatilecode.VolatileCodeEnabled_1_12_R1; import com.nisovin.magicspells.volatilecode.VolatileCodeEnabled_1_12_R1;
import de.slikey.effectlib.util.ParticleEffect;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.Material; import org.bukkit.Material;
Expand Down Expand Up @@ -203,6 +204,13 @@ void load() {


effectManager = new EffectManager(this); effectManager = new EffectManager(this);
effectManager.enableDebug(debug); effectManager.enableDebug(debug);
try {
Class<?> particleEffectClass = ParticleEffect.class;
Method setEffectManagerMethod = particleEffectClass.getMethod("setEffectManager", EffectManager.class);
setEffectManagerMethod.invoke(null, effectManager);
} catch (Exception ignored) {
// No-op
}


// Create storage stuff // Create storage stuff
spells = new HashMap<>(); spells = new HashMap<>();
Expand Down

0 comments on commit e53980a

Please sign in to comment.