mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-12-24 17:47:44 +01:00
Configuration options for particles
This commit is contained in:
parent
e9dcb31002
commit
214079a3cd
@ -106,6 +106,13 @@ public class Config extends AutoUpdateConfigLoader {
|
||||
public int getChimaeraItemId() { return config.getInt("Items.Chimaera_Wing.Item_ID", 288); }
|
||||
public boolean getChimaeraEnabled() { return config.getBoolean("Items.Chimaera_Wing.Enabled", true); }
|
||||
|
||||
/* Particles */
|
||||
public boolean getAbilityActivationEffectEnabled() { return config.getBoolean("Particles.Ability_Activation", true); }
|
||||
public boolean getAbilityDeactivationEffectEnabled() { return config.getBoolean("Particles.Ability_Deactivation", true); }
|
||||
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); }
|
||||
|
||||
/* PARTY SETTINGS */
|
||||
public int getAutoPartyKickInterval() { return config.getInt("Party.AutoKick_Interval", 12); }
|
||||
public int getAutoPartyKickTime() { return config.getInt("Party.Old_Party_Member_Cutoff", 7); }
|
||||
|
@ -14,15 +14,25 @@ import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.meta.FireworkMeta;
|
||||
|
||||
import com.gmail.nossr50.config.Config;
|
||||
|
||||
public final class ParticleEffectUtils {
|
||||
|
||||
private ParticleEffectUtils() {};
|
||||
|
||||
public static void playBleedEffect(Player player) {
|
||||
if (!Config.getInstance().getBleedEffectEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
player.getWorld().playEffect(player.getEyeLocation(), Effect.STEP_SOUND, Material.REDSTONE_WIRE);
|
||||
}
|
||||
|
||||
public static void playDodgeEffect(Player player) {
|
||||
if (!Config.getInstance().getDodgeEffectEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Location location = player.getEyeLocation();
|
||||
World world = player.getWorld();
|
||||
|
||||
@ -38,16 +48,28 @@ public final class ParticleEffectUtils {
|
||||
}
|
||||
|
||||
public static void playGreaterImpactEffect(LivingEntity livingEntity) {
|
||||
if (!Config.getInstance().getGreaterImpactEffectEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Location location = livingEntity.getEyeLocation();
|
||||
|
||||
livingEntity.getWorld().createExplosion(location.getX(), location.getY(), location.getZ(), 0F, false, false);
|
||||
}
|
||||
|
||||
public static void playAbilityEnabledEffect(Player player) {
|
||||
if (!Config.getInstance().getAbilityActivationEffectEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
fireworkParticleShower(player, Color.GREEN);
|
||||
}
|
||||
|
||||
public static void playAbilityDisabledEffect(Player player) {
|
||||
if (!Config.getInstance().getAbilityDeactivationEffectEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
fireworkParticleShower(player, Color.RED);
|
||||
}
|
||||
|
||||
|
@ -356,3 +356,12 @@ Commands:
|
||||
a:
|
||||
#Allow mcMMO to use player display names in chat instead of their usernames
|
||||
Use_Display_Names: true
|
||||
#
|
||||
# Settings for particles
|
||||
###
|
||||
Particles:
|
||||
Ability_Activation: true
|
||||
Ability_Deactivation: true
|
||||
Dodge: true
|
||||
Bleed: true
|
||||
Greater_Impact: true
|
||||
|
Loading…
Reference in New Issue
Block a user