Search in sources :

Example 1 with AvatarState

use of com.projectkorra.projectkorra.avatar.AvatarState in project Spirits by xNuminousx.

the class Fuse method defuse.

public void defuse() {
    if (player.getGameMode() == GameMode.SPECTATOR) {
        player.setSpectatorTarget(null);
        player.setGameMode(originGM);
    }
    if (target instanceof Player) {
        BendingPlayer bTarget = BendingPlayer.getBendingPlayer((Player) target);
        if (bTarget.isAvatarState()) {
            AvatarState avatarState = getAbility((Player) target, AvatarState.class);
            avatarState.remove();
        }
    }
}
Also used : BendingPlayer(com.projectkorra.projectkorra.BendingPlayer) BendingPlayer(com.projectkorra.projectkorra.BendingPlayer) Player(org.bukkit.entity.Player) AvatarState(com.projectkorra.projectkorra.avatar.AvatarState)

Aggregations

BendingPlayer (com.projectkorra.projectkorra.BendingPlayer)1 AvatarState (com.projectkorra.projectkorra.avatar.AvatarState)1 Player (org.bukkit.entity.Player)1