Fix slowdowns with new fire mechanic system with Fire Resistant targets.

master_event
sigonasr2 11 years ago
parent 51d12f53e7
commit 12967289c8
  1. 4
      BankEconomyMod/src/me/kaZep/Base/PlayerListener.java

@ -7060,7 +7060,9 @@ implements Listener
@EventHandler @EventHandler
public void onPlayerOnFire(EntityCombustEvent e) { public void onPlayerOnFire(EntityCombustEvent e) {
if (e.getEntity() instanceof LivingEntity) { 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) { if (e.getEntity().getType()==EntityType.PLAYER) {
Player p = (Player)e.getEntity(); Player p = (Player)e.getEntity();

Loading…
Cancel
Save