Interface LobbyManager
-
public interface LobbyManager
等候大堂管理器
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ImmutableList<Arena>getCandidate()獲取可投票場地ImmutableMap<Arena,ImmutableList<GamePlayer>>getResult()獲取目前投票結果Optional<Arena>getVoted(GamePlayer player)獲取該玩家投票的場地voidrunFinalResult()運行投票結果計算出最終場地voidtpLobbySpawn(Player player)傳送到大堂位置voidunVote(GamePlayer player)取消玩家投票voidvote(GamePlayer player, Arena arena)玩家投票
-
-
-
Method Detail
-
tpLobbySpawn
void tpLobbySpawn(Player player)
傳送到大堂位置- Parameters:
player- 玩家
-
getCandidate
ImmutableList<Arena> getCandidate()
獲取可投票場地- Returns:
- 可投票場地
-
getVoted
Optional<Arena> getVoted(GamePlayer player)
獲取該玩家投票的場地- Parameters:
player- 玩家- Returns:
- 可能為 null 的 投票場地
-
vote
void vote(GamePlayer player, Arena arena) throws AlreadyVotedException
玩家投票- Parameters:
player- 玩家arena- 投票場地- Throws:
AlreadyVotedException- 已經投票了相同場地時
-
unVote
void unVote(GamePlayer player)
取消玩家投票- Parameters:
player- 玩家
-
getResult
ImmutableMap<Arena,ImmutableList<GamePlayer>> getResult()
獲取目前投票結果- Returns:
- 投票結果
-
runFinalResult
void runFinalResult() throws NoFinalArenaException
運行投票結果計算出最終場地- Throws:
NoFinalArenaException- 找不到最終場地時
-
-