only auto-convert legacy data if the new data directory doesn't exist
This commit is contained in:
parent
31e64a15fe
commit
c244cb6bab
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue