Don't apply velocity to team mates

This commit is contained in:
xGamingDudex 2016-10-22 10:48:36 +02:00
parent d2be1fc646
commit 8414a17978

View File

@ -30,6 +30,8 @@ import mineplex.core.projectile.ProjectileUser;
import mineplex.core.recharge.Recharge;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import nautilus.game.arcade.kit.Perk;
public class PerkWhirlpoolBlade extends Perk implements IThrown
@ -129,8 +131,11 @@ public class PerkWhirlpoolBlade extends Perk implements IThrown
return;
}
Manager.GetDamage().NewDamageEvent(target, data.getThrower(), null, DamageCause.CUSTOM, DAMAGE, false, true, true, data.getThrower().getName(), GetName());
CustomDamageEvent event = Manager.GetDamage().NewDamageEvent(target, data.getThrower(), null, DamageCause.CUSTOM, DAMAGE, false, true, true, data.getThrower().getName(), GetName());
if(event.IsCancelled())
{
return;
}
UtilAction.velocity(target, UtilAlg.getTrajectory(target, data.getThrower()).setY(0.5));
}