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

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

@ -7060,8 +7060,10 @@ implements Listener
@EventHandler @EventHandler
public void onPlayerOnFire(EntityCombustEvent e) { public void onPlayerOnFire(EntityCombustEvent e) {
if (e.getEntity() instanceof LivingEntity) { if (e.getEntity() instanceof LivingEntity) {
if (!((LivingEntity)(e.getEntity())).hasPotionEffect(PotionEffectType.FIRE_RESISTANCE)) {
doFireAspectDamage(((LivingEntity)e.getEntity()), this.plugin); 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();
if (this.plugin.getAccountsConfig().getInt(p.getName().toLowerCase()+".stats.stat6")>0) { if (this.plugin.getAccountsConfig().getInt(p.getName().toLowerCase()+".stats.stat6")>0) {

Loading…
Cancel
Save