Package org.spongepowered.api.map
Interface MapStorage
-
public interface MapStorage
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Collection<MapInfo>
allMapInfos()
Get allMapInfo
s that exist on this server.java.util.Optional<MapInfo>
createNewMapInfo()
Creates a newMapInfo
.java.util.Optional<MapInfo>
mapInfo(java.util.UUID uuid)
Gets a MapInfo by its UUID.
-
-
-
Method Detail
-
allMapInfos
java.util.Collection<MapInfo> allMapInfos()
Get allMapInfo
s that exist on this server.- Returns:
- Set of MapInfos
-
mapInfo
java.util.Optional<MapInfo> mapInfo(java.util.UUID uuid)
Gets a MapInfo by its UUID.- Parameters:
uuid
- UUID of map to get- Returns:
- The map with given uuid, or empty if it doesn't exist.
-
createNewMapInfo
java.util.Optional<MapInfo> createNewMapInfo()
Creates a newMapInfo
.The MapInfo will not be successfully created if the fired
CreateMapEvent
is cancelled. This can happen due to either a plugin cancelling it, or running out of room for maps. (Max amount of maps is 2147483647)- Returns:
MapInfo
the new MapInfo if available
-
-