Fixed guardian passive to acctually work
This commit is contained in:
parent
0b02bc9e2d
commit
8de69d2573
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user