mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 16:46:46 +01:00
Fix old files if they exist.
This commit is contained in:
parent
c2f8f4d016
commit
9aaea7e44f
@ -290,6 +290,20 @@ public class mcMMO extends JavaPlugin {
|
|||||||
flatFileDirectory = mainDirectory + "flatfile" + File.separator;
|
flatFileDirectory = mainDirectory + "flatfile" + File.separator;
|
||||||
usersFile = flatFileDirectory + "mcmmo.users";
|
usersFile = flatFileDirectory + "mcmmo.users";
|
||||||
modDirectory = mainDirectory + "mods" + File.separator;
|
modDirectory = mainDirectory + "mods" + File.separator;
|
||||||
|
fixFilePaths();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void fixFilePaths() {
|
||||||
|
File oldFlatfilePath = new File(mainDirectory + "FlatFileStuff" + File.separator);
|
||||||
|
File oldModPath = new File(mainDirectory + "ModConfigs" + File.separator);
|
||||||
|
|
||||||
|
if (oldFlatfilePath.exists()) {
|
||||||
|
oldFlatfilePath.renameTo(new File(flatFileDirectory));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (oldModPath.exists()) {
|
||||||
|
oldModPath.renameTo(new File(modDirectory));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkForUpdates() {
|
private void checkForUpdates() {
|
||||||
|
Loading…
Reference in New Issue
Block a user