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