only auto-convert legacy data if the new data directory doesn't exist

This commit is contained in:
Pyrbu 2023-08-05 21:01:04 +02:00
parent 31e64a15fe
commit c244cb6bab

@ -103,7 +103,7 @@ public class ZNpcsPlus extends JavaPlugin {
PluginManager pluginManager = Bukkit.getPluginManager();
long before = System.currentTimeMillis();
boolean legacy = new File(getDataFolder(), "data.json").isFile();
boolean legacy = new File(getDataFolder(), "data.json").isFile() && !new File(getDataFolder(), "data").isDirectory();
if (legacy) try {
Files.move(getDataFolder().toPath(), new File(getDataFolder().getParentFile(), "ZNPCsPlusLegacy").toPath());
} catch (IOException e) {