001package com.ericlam.mc.minigames.core.character;
002
003import com.ericlam.mc.minigames.core.function.Castable;
004import org.bukkit.entity.Player;
005
006/**
007 * 代表遊戲玩家的接口, 包括觀戰/遊戲/投票中的玩家。
008 */
009public interface GamePlayer extends Castable<GamePlayer> {
010
011    /**
012     * @return 真正的玩家實體
013     */
014    Player getPlayer();
015
016    /**
017     * @return 該玩家的狀態
018     */
019    Status getStatus();
020
021    /**
022     * 設置該玩家的狀態
023     *
024     * @param status 狀態
025     */
026    void setStatus(Status status);
027
028    /**
029     * 玩家狀態
030     */
031    enum Status {
032        /**
033         * 遊戲中
034         */
035        GAMING,
036        /**
037         * 大堂投票中
038         */
039        WAITING,
040        /**
041         * 觀戰中
042         */
043        SPECTATING;
044    }
045
046}