diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/skills/display/DamageIndicatorListener.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/skills/display/DamageIndicatorListener.kt index 73e8249f..fe2cdbdc 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/skills/display/DamageIndicatorListener.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoskills/skills/display/DamageIndicatorListener.kt @@ -3,6 +3,7 @@ package com.willfp.ecoskills.skills.display import com.willfp.eco.core.EcoPlugin import com.willfp.eco.core.Prerequisite import com.willfp.eco.core.integrations.hologram.HologramManager +import com.willfp.eco.util.containsIgnoreCase import com.willfp.eco.util.formatEco import com.willfp.eco.util.randDouble import com.willfp.eco.util.toNiceString @@ -40,6 +41,13 @@ class DamageIndicatorListener( return } + val disabledForEntities = plugin.configYml + .getStrings("damage-indicators.disabled-for-entities") + + if (disabledForEntities.containsIgnoreCase(victim.type.name)) { + return + } + val location = victim.location.clone() .add(0.0, victim.height, 0.0) .withHoloOffset() diff --git a/eco-core/core-plugin/src/main/resources/config.yml b/eco-core/core-plugin/src/main/resources/config.yml index 909e1106..2497da40 100644 --- a/eco-core/core-plugin/src/main/resources/config.yml +++ b/eco-core/core-plugin/src/main/resources/config.yml @@ -272,6 +272,52 @@ damage-indicators: enabled: true final-damage: false # If final damage (with reductions applied) should be used. + disabled-for-entities: + - area_effect_cloud + - armor_stand + - arrow + - block_display + - dragon_fireball + - dropped_item + - egg + - ender_crystal + - ender_pearl + - ender_signal + - evoker_fangs + - experience_orb + - fireball + - falling_block + - firework_rocket + - fishing_hook + - glow_item_frame + - interaction + - item_display + - item_frame + - leash_hitch + - lightning + - llama_spit + - marker + - minecart + - minecart_chest + - minecart_command + - minecart_furnace + - minecart_hopper + - minecart_mob_spawner + - minecart_tnt + - painting + - primed_tnt + - shulker_bullet + - small_fireball + - snowball + - spectral_arrow + - splash_potion + - text_display + - thrown_exp_bottle + - trident + - unknown + - wind_charge + - wither_skull + format: normal: "&7%damage%" crit: "&f✧ %damage% &f✧"