Fix slowdowns with new fire mechanic system with Fire Resistant targets.
This commit is contained in:
parent
51d12f53e7
commit
12967289c8
@ -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…
x
Reference in New Issue
Block a user