Fixed kinetic applying incorrectly
This commit is contained in:
@@ -3,6 +3,7 @@ package com.willfp.ecoenchants.enchantments.ecoenchants.normal;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchantBuilder;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchants;
|
||||
import com.willfp.ecoenchants.util.Logger;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
public final class Kinetic extends EcoEnchant {
|
||||
@@ -17,7 +18,7 @@ public final class Kinetic extends EcoEnchant {
|
||||
|
||||
@Override
|
||||
public void onDamageWearingArmor(LivingEntity victim, int level, EntityDamageEvent event) {
|
||||
if(event.getCause().equals(EntityDamageEvent.DamageCause.FLY_INTO_WALL)) return;
|
||||
if(!event.getCause().equals(EntityDamageEvent.DamageCause.FLY_INTO_WALL)) return;
|
||||
|
||||
double reduction = this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "reduction-per-level");
|
||||
double multiplier = 1 - ((reduction/100) * level);
|
||||
|
||||
Reference in New Issue
Block a user