mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-03 18:43:43 +01:00 
			
		
		
		
	Configuration options for particles
This commit is contained in:
		@@ -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);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -355,4 +355,13 @@ Commands:
 | 
			
		||||
        Use_Display_Names: true
 | 
			
		||||
    a:
 | 
			
		||||
        #Allow mcMMO to use player display names in chat instead of their usernames
 | 
			
		||||
        Use_Display_Names: true
 | 
			
		||||
        Use_Display_Names: true
 | 
			
		||||
#
 | 
			
		||||
#  Settings for particles
 | 
			
		||||
###
 | 
			
		||||
Particles:
 | 
			
		||||
    Ability_Activation: true
 | 
			
		||||
    Ability_Deactivation: true
 | 
			
		||||
    Dodge: true
 | 
			
		||||
    Bleed: true
 | 
			
		||||
    Greater_Impact: true
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user