Stampede cancel on damage taken
This commit is contained in:
parent
a150249f4f
commit
0f0b66a8cf
@ -46,7 +46,9 @@ public class Stampede extends Skill
|
||||
"",
|
||||
"Attacking during stampede deals",
|
||||
"#0#0.5 bonus damage per speed level,",
|
||||
"and +50% knockback per speed level."
|
||||
"and +50% knockback per speed level.",
|
||||
"",
|
||||
"Resets if you take damage."
|
||||
});
|
||||
}
|
||||
|
||||
@ -165,6 +167,18 @@ public class Stampede extends Skill
|
||||
//Event
|
||||
UtilServer.getServer().getPluginManager().callEvent(new SkillEvent(damager, GetName(), ClassType.Brute, damagee));
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
public void DamageCancel(CustomDamageEvent event)
|
||||
{
|
||||
if (event.IsCancelled())
|
||||
return;
|
||||
|
||||
Player damagee = event.GetDamageePlayer();
|
||||
if (damagee == null) return;
|
||||
|
||||
Reset(damagee);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Reset(Player player)
|
||||
|
Loading…
Reference in New Issue
Block a user