Search in sources :

Example 1 with Strike

use of me.xnuminousx.spirits.ability.dark.Strike in project Spirits by xNuminousx.

the class AbilityListener method onSwing.

@EventHandler
public void onSwing(PlayerAnimationEvent event) {
    Player player = event.getPlayer();
    BendingPlayer bPlayer = BendingPlayer.getBendingPlayer(player);
    if (event.isCancelled() || bPlayer == null) {
        return;
    } else if (bPlayer.getBoundAbilityName().equalsIgnoreCase(null)) {
        return;
    } else if (bPlayer.getBoundAbilityName().equalsIgnoreCase("Agility")) {
        new Dash(player);
    } else if (bPlayer.getBoundAbilityName().equalsIgnoreCase("Shackle")) {
        new Shackle(player);
    } else if (bPlayer.getBoundAbilityName().equalsIgnoreCase("Shelter")) {
        new Shelter(player, ShelterType.CLICK);
    } else if (bPlayer.getBoundAbilityName().equalsIgnoreCase("Strike")) {
        new Strike(player);
    }
}
Also used : BendingPlayer(com.projectkorra.projectkorra.BendingPlayer) BendingPlayer(com.projectkorra.projectkorra.BendingPlayer) Player(org.bukkit.entity.Player) Dash(me.xnuminousx.spirits.ability.spirit.Dash) Strike(me.xnuminousx.spirits.ability.dark.Strike) Shelter(me.xnuminousx.spirits.ability.light.Shelter) Shackle(me.xnuminousx.spirits.ability.dark.Shackle) EventHandler(org.bukkit.event.EventHandler)

Aggregations

BendingPlayer (com.projectkorra.projectkorra.BendingPlayer)1 Shackle (me.xnuminousx.spirits.ability.dark.Shackle)1 Strike (me.xnuminousx.spirits.ability.dark.Strike)1 Shelter (me.xnuminousx.spirits.ability.light.Shelter)1 Dash (me.xnuminousx.spirits.ability.spirit.Dash)1 Player (org.bukkit.entity.Player)1 EventHandler (org.bukkit.event.EventHandler)1