1.4
Bugfix: Fixed a bug where the plugin was not loading properly
This commit is contained in:
parent
97fc283951
commit
9aede116ac
2
pom.xml
2
pom.xml
@ -7,7 +7,7 @@
|
||||
<groupId>net.t2code</groupId>
|
||||
<artifactId>Alias</artifactId>
|
||||
|
||||
<version>1.3</version>
|
||||
<version>1.4</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>T2C-Alias</name>
|
||||
|
@ -17,8 +17,9 @@ import java.util.logging.Level;
|
||||
|
||||
public class Convert {
|
||||
protected static void convert() {
|
||||
File config = new File(Main.getPath(),"");
|
||||
if (config.exists()) convertTo4();
|
||||
File path = new File(Main.getPath(),"");
|
||||
File file = new File(Main.getPath(), "config.yml");
|
||||
if (path.exists() && file.exists()) convertTo4();
|
||||
}
|
||||
|
||||
private static void convertTo4() {
|
||||
@ -26,7 +27,7 @@ public class Convert {
|
||||
File config = new File(Main.getPath(), "config.yml");
|
||||
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config);
|
||||
|
||||
if (yamlConfiguration.get(Config.configVersion.path) == null || ((Integer) Config.configVersion.value) < Util.getConfigVersion() && new File(Main.getPath(), "config.yml").exists()) {
|
||||
if (yamlConfiguration.get(Config.configVersion.path) == null || ((Integer) Config.configVersion.value) < Util.getConfigVersion()) {
|
||||
yamlConfiguration.set("ConfigVersion", null);
|
||||
try {
|
||||
yamlConfiguration.save(config);
|
||||
@ -36,6 +37,9 @@ public class Convert {
|
||||
|
||||
File dir = new File(Main.getPath() + "/languages");
|
||||
File newDir = new File(Main.getPath() + "/OldConfig/Version3/languages");
|
||||
if (!dir.exists()){
|
||||
return;
|
||||
}
|
||||
try {
|
||||
FileUtils.moveDirectory(dir, newDir);
|
||||
} catch (IOException e) {
|
||||
|
Loading…
Reference in New Issue
Block a user