Search in sources :

Example 1 with Intoxicate

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

the class AbilityListener method onSneak.

@EventHandler
public void onSneak(PlayerToggleSneakEvent 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("Possess")) {
        new Possess(player);
    } else if (bPlayer.getBoundAbilityName().equalsIgnoreCase("Alleviate")) {
        new Alleviate(player);
    } else if (bPlayer.getBoundAbilityName().equalsIgnoreCase("Intoxicate")) {
        new Intoxicate(player);
    } else if (bPlayer.getBoundAbilityName().equalsIgnoreCase("Agility")) {
        new Soar(player);
    } else if (bPlayer.getBoundAbilityName().equalsIgnoreCase("Shelter")) {
        new Shelter(player, ShelterType.SHIFT);
    } else if (bPlayer.getBoundAbilityName().equalsIgnoreCase("Vanish")) {
        if (event.isSneaking()) {
            new Vanish(player);
        } else {
            return;
        }
    }
}
Also used : Possess(me.xnuminousx.spirits.ability.spirit.Possess) Intoxicate(me.xnuminousx.spirits.ability.dark.Intoxicate) Vanish(me.xnuminousx.spirits.ability.spirit.Vanish) BendingPlayer(com.projectkorra.projectkorra.BendingPlayer) BendingPlayer(com.projectkorra.projectkorra.BendingPlayer) Player(org.bukkit.entity.Player) Alleviate(me.xnuminousx.spirits.ability.light.Alleviate) Soar(me.xnuminousx.spirits.ability.spirit.Soar) Shelter(me.xnuminousx.spirits.ability.light.Shelter) EventHandler(org.bukkit.event.EventHandler)

Aggregations

BendingPlayer (com.projectkorra.projectkorra.BendingPlayer)1 Intoxicate (me.xnuminousx.spirits.ability.dark.Intoxicate)1 Alleviate (me.xnuminousx.spirits.ability.light.Alleviate)1 Shelter (me.xnuminousx.spirits.ability.light.Shelter)1 Possess (me.xnuminousx.spirits.ability.spirit.Possess)1 Soar (me.xnuminousx.spirits.ability.spirit.Soar)1 Vanish (me.xnuminousx.spirits.ability.spirit.Vanish)1 Player (org.bukkit.entity.Player)1 EventHandler (org.bukkit.event.EventHandler)1