From 6c3820c747f1dca88757de4188ee6e0be144a0f2 Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Mon, 1 Apr 2013 16:38:22 +0200 Subject: [PATCH] Because some people really wanted to disable this, mostly due to clientside lag. --- src/main/java/com/gmail/nossr50/config/Config.java | 1 + src/main/java/com/gmail/nossr50/listeners/SelfListener.java | 5 +++++ src/main/resources/config.yml | 4 +++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/config/Config.java b/src/main/java/com/gmail/nossr50/config/Config.java index a11391805..889179d32 100644 --- a/src/main/java/com/gmail/nossr50/config/Config.java +++ b/src/main/java/com/gmail/nossr50/config/Config.java @@ -115,6 +115,7 @@ public class Config extends AutoUpdateConfigLoader { public boolean getDodgeEffectEnabled() { return config.getBoolean("Particles.Dodge", true); } public boolean getBleedEffectEnabled() { return config.getBoolean("Particles.Bleed", true); } public boolean getGreaterImpactEffectEnabled() { return config.getBoolean("Particles.Greater_Impact", true); } + public boolean getLevelUpEffectsEnabled() { return config.getBoolean("Particles.LevelUp", true); } /* PARTY SETTINGS */ public int getAutoPartyKickInterval() { return config.getInt("Party.AutoKick_Interval", 12); } diff --git a/src/main/java/com/gmail/nossr50/listeners/SelfListener.java b/src/main/java/com/gmail/nossr50/listeners/SelfListener.java index aeb1343a8..c1fbb007f 100644 --- a/src/main/java/com/gmail/nossr50/listeners/SelfListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/SelfListener.java @@ -6,12 +6,17 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; +import com.gmail.nossr50.config.Config; import com.gmail.nossr50.events.experience.McMMOPlayerLevelUpEvent; import com.gmail.nossr50.util.skills.ParticleEffectUtils; public class SelfListener implements Listener { @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void onPlayerLevelUp(McMMOPlayerLevelUpEvent event) { + if (!Config.getInstance().getLevelUpEffectsEnabled()) { + return; + } + Calendar today = Calendar.getInstance(); if (today.get(Calendar.MONTH) == Calendar.APRIL && today.get(Calendar.DAY_OF_MONTH) == 1) { ParticleEffectUtils.runescapeModeCelebration(event.getPlayer(), event.getSkill()); diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 2c9c346db..dc9c9119c 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -368,8 +368,10 @@ Particles: # These settings determine if fireworks should get launched when a player activates/deactivates an ability Ability_Activation: true Ability_Deactivation: true - + # Use particle effect when these abilities trigger Dodge: true Bleed: true Greater_Impact: true + + LevelUp: true