001package com.ericlam.mc.minigames.core.arena;
002
003import com.google.common.collect.ImmutableMap;
004import org.bukkit.Location;
005import org.bukkit.World;
006
007import javax.annotation.Nonnull;
008import java.io.File;
009import java.util.concurrent.CompletableFuture;
010
011/**
012 * 用於被使用者實作來註冊場地機制運作
013 */
014public interface ArenaConfig {
015
016    /**
017     * @return 場地裝載資料夾
018     */
019    File getArenaFolder();
020
021    /**
022     * @return 最大場地加載數(等待中時)
023     */
024    int getMaxLoadArena();
025
026    /**
027     * @param world 世界設置
028     */
029    void setExtraWorldSetting(@Nonnull World world);
030
031    /**
032     * 獲得可設置的地標名稱和最大設置數
033     * <p>
034     * String 是地標名稱, Integer 是該地標最大設置數
035     *
036     * @return 允許的地標
037     */
038    ImmutableMap<String, Integer> getAllowWarps();
039
040    /**
041     * @return 等候房間位置
042     */
043    Location getLobbyLocation();
044
045    /**
046     * 當遊戲結束後自動回傳的伺服器
047     *
048     * @return 返回伺服器的名稱
049     */
050    String getFallBackServer();
051
052    /**
053     * @return 此小遊戲的前綴
054     */
055    String getGamePrefix();
056
057    /**
058     * 如何儲存等候房間位置到你的 yaml
059     *
060     * @param location 等候房間位置
061     * @return 設置是否成功
062     */
063    CompletableFuture<Boolean> setLobbyLocation(final Location location);
064
065}