diff options
Diffstat (limited to 'src/main/kotlin/io/dico/parcels2/ParcelsPlugin.kt')
-rw-r--r-- | src/main/kotlin/io/dico/parcels2/ParcelsPlugin.kt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/kotlin/io/dico/parcels2/ParcelsPlugin.kt b/src/main/kotlin/io/dico/parcels2/ParcelsPlugin.kt index 689a534..cc06f85 100644 --- a/src/main/kotlin/io/dico/parcels2/ParcelsPlugin.kt +++ b/src/main/kotlin/io/dico/parcels2/ParcelsPlugin.kt @@ -77,13 +77,15 @@ class ParcelsPlugin : JavaPlugin() { if (optionsFile.exists()) { yamlObjectMapper.readerForUpdating(options).readValue<Options>(optionsFile) } else if (optionsFile.tryCreate()) { - options.addWorld("plotworld", WorldOptions()) + options.addWorld("parcels", WorldOptions()) try { yamlObjectMapper.writeValue(optionsFile, options) } catch (ex: Throwable) { optionsFile.delete() throw ex } + plogger.warn("Created options file with a world template. Please review it before next start.") + return false } else { plogger.error("Failed to save options file ${optionsFile.canonicalPath}") return false |