1
0
Fork 0

Check whether data folder exists and log it

main
Mari 4 years ago
parent 6a0f96eb49
commit 0be70c607f
  1. 3
      src/main/kotlin/net/deliciousreya/minecraftportal/MinecraftPortalPlugin.kt

@ -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)

Loading…
Cancel
Save