Fixed guardian passive to acctually work

This commit is contained in:
xGamingDudex 2016-10-19 17:49:59 +02:00
parent 0b02bc9e2d
commit 8de69d2573

View File

@ -7,6 +7,7 @@ import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import mineplex.core.common.util.C;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import nautilus.game.arcade.kit.Perk;
public class PerkThorns extends Perk
@ -29,17 +30,18 @@ public class PerkThorns extends Perk
return;
}
Player player = event.GetDamagerPlayer(true);
Player player = event.GetDamageePlayer();
if (!hasPerk(player))
{
return;
}
if (player.getHealth() < MAX_HEALTH)
{
event.AddMod(GetName(), -DAMAGE_DECREASE * event.GetDamage());
event.AddKnockback(GetName(), -KNOCKBACK_DECREASE);
event.AddMult(GetName(), null, DAMAGE_DECREASE, false);
event.AddKnockback(GetName(), KNOCKBACK_DECREASE);
}
}
}