use of me.xnuminousx.spirits.ability.light.Alleviate 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;
}
}
}
Aggregations