001package com.ericlam.mc.minigames.core.arena; 002 003import com.ericlam.mc.minigames.core.function.Castable; 004import org.bukkit.Location; 005import org.bukkit.World; 006 007import java.util.List; 008import java.util.Map; 009 010/** 011 * 場地接口,是場地API的主體 012 */ 013public interface Arena extends Castable<Arena> { 014 015 /** 016 * @return 場地作者 017 */ 018 String getAuthor(); 019 020 /** 021 * @return 場地世界 022 */ 023 World getWorld(); 024 025 /** 026 * @return 場地名稱 027 */ 028 String getArenaName(); 029 030 /** 031 * @return 顯示名稱 032 */ 033 String getDisplayName(); 034 035 /** 036 * @return 場地的地標列表 037 */ 038 Map<String, List<Location>> getLocationsMap(); 039 040 /** 041 * @param warp 地標 042 * @return 位置列表 043 */ 044 default List<Location> getWarp(String warp) { 045 return getLocationsMap().get(warp); 046 } 047 048 /** 049 * @return 場地描述 050 */ 051 List<String> getDescription(); 052 053 /** 054 * @return 場地資訊 055 */ 056 String[] getInfo(); 057 058}