From 12967289c8600f67d6b3d0ab1c466a8297110476 Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Wed, 27 Nov 2013 13:07:29 -0700 Subject: [PATCH] Fix slowdowns with new fire mechanic system with Fire Resistant targets. --- BankEconomyMod/src/me/kaZep/Base/PlayerListener.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java b/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java index 544fef8..7de3af4 100644 --- a/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java +++ b/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java @@ -7060,7 +7060,9 @@ implements Listener @EventHandler public void onPlayerOnFire(EntityCombustEvent e) { if (e.getEntity() instanceof LivingEntity) { - doFireAspectDamage(((LivingEntity)e.getEntity()), this.plugin); + if (!((LivingEntity)(e.getEntity())).hasPotionEffect(PotionEffectType.FIRE_RESISTANCE)) { + doFireAspectDamage(((LivingEntity)e.getEntity()), this.plugin); + } } if (e.getEntity().getType()==EntityType.PLAYER) { Player p = (Player)e.getEntity();