|
|
|
@ -37,8 +37,11 @@ class MinecraftPortalPlugin() : JavaPlugin(), Listener |
|
|
|
|
if (dataFolder.exists()) { |
|
|
|
|
throw IllegalStateException("Data folder already exists but not as a directory") |
|
|
|
|
} else { |
|
|
|
|
logger.info("Setting up in newly created data directory $dataFolder") |
|
|
|
|
dataFolder.mkdirs() |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
logger.info("Setting up in data directory $dataFolder") |
|
|
|
|
} |
|
|
|
|
portals.loadFromAndAutoSaveTo(server, dataFolder.resolve("portal_data.binproto"), dataFolder.resolve("portal_data.binproto.bak")) |
|
|
|
|
portals.validateWorldOnStartup(logger) |
|
|
|
|