diff --git a/plugins/finale-paper/src/main/java/com/github/maxopoly/finale/listeners/NetheriteFireResistanceListener.java b/plugins/finale-paper/src/main/java/com/github/maxopoly/finale/listeners/NetheriteFireResistanceListener.java index 4c66ff947..acda5e1ce 100644 --- a/plugins/finale-paper/src/main/java/com/github/maxopoly/finale/listeners/NetheriteFireResistanceListener.java +++ b/plugins/finale-paper/src/main/java/com/github/maxopoly/finale/listeners/NetheriteFireResistanceListener.java @@ -9,6 +9,7 @@ import org.bukkit.inventory.ItemStack; import org.bukkit.plugin.Plugin; import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; +import vg.civcraft.mc.civmodcore.inventory.CustomItem; public class NetheriteFireResistanceListener { @@ -31,6 +32,7 @@ public class NetheriteFireResistanceListener { public void applyFireResistance() { for (Player player : Bukkit.getOnlinePlayers()) { int pieces = 0; + int mpieces = 0; for (ItemStack armour : player.getInventory().getArmorContents()) { if (armour == null) { continue; @@ -39,8 +41,12 @@ public class NetheriteFireResistanceListener { switch (type) { case NETHERITE_BOOTS, NETHERITE_HELMET, NETHERITE_CHESTPLATE, NETHERITE_LEGGINGS -> pieces++; } + String customItem = CustomItem.getCustomItemKey(armour); + if (customItem != null && customItem.startsWith("meteoric_iron_")) { + mpieces++; + } } - if (pieces == 4) { + if (pieces == 4 || mpieces == 4) { PotionEffect currentEffect = player.getPotionEffect(PotionEffectType.FIRE_RESISTANCE); if (currentEffect == null || currentEffect.getDuration() < 5 * 20 + 19) { player.addPotionEffect(new PotionEffect(