Package org.sgrewritten.stargate.util
Class LegacyPortalStorageLoader
java.lang.Object
org.sgrewritten.stargate.util.LegacyPortalStorageLoader
A helper tool for loading legacy portals from legacy storage
-
Method Summary
Modifier and TypeMethodDescriptionloadPortalsFromStorage
(File dir, String defaultNetworkName, StargateAPI stargateAPI) Loads legacy portals in .db files from the given folder
-
Method Details
-
loadPortalsFromStorage
@NotNull public static @NotNull List<Portal> loadPortalsFromStorage(File dir, String defaultNetworkName, StargateAPI stargateAPI) throws IOException, InvalidStructureException, TranslatableException Loads legacy portals in .db files from the given folder- Parameters:
dir
-The folder containing legacy portals
defaultNetworkName
-The default network name
stargateAPI
-The stargate API
- Returns:
The list of loaded and saved portals
- Throws:
IOException
-If unable to read one or more .db files
InvalidStructureException
-If an encountered portal's structure is invalid
TranslatableException
-