Skip to content

Commit

Permalink
Remove the Bukkit legacy data folder migration code from 11 years ago (
Browse files Browse the repository at this point in the history
…#2383)

(cherry picked from commit EngineHub/WorldEdit@7f81aad)
  • Loading branch information
me4502 authored and MattBDev committed Aug 10, 2023
1 parent acb7946 commit a088e6a
Showing 1 changed file with 0 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import com.sk89q.worldedit.util.report.Unreported;
import org.apache.logging.log4j.LogManager;

import java.io.File;
import java.nio.file.Path;

/**
Expand Down Expand Up @@ -53,26 +52,6 @@ public void load() {
WorldEdit.logger.warn("Editing without a Bukkit adapter has been enabled. You will not receive support "
+ "for any issues that arise as a result.");
}
migrateLegacyFolders();
}

private void migrateLegacyFolders() {
migrate(scriptsDir, "craftscripts");
migrate(saveDir, "schematics");
migrate("drawings", "draw.js images");
}

private void migrate(String file, String name) {
File fromDir = new File(".", file);
File toDir = new File(getWorkingDirectoryPath().toFile(), file);
if (fromDir.exists() & !toDir.exists()) {
if (fromDir.renameTo(toDir)) {
plugin.getLogger().info("Migrated " + name + " folder '" + file
+ "' from server root to plugin data folder.");
} else {
plugin.getLogger().warning("Error while migrating " + name + " folder!");
}
}
}

@Override
Expand Down

0 comments on commit a088e6a

Please sign in to comment.