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>
|
<groupId>net.t2code</groupId>
|
||||||
<artifactId>Alias</artifactId>
|
<artifactId>Alias</artifactId>
|
||||||
|
|
||||||
<version>1.3</version>
|
<version>1.4</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>T2C-Alias</name>
|
<name>T2C-Alias</name>
|
||||||
|
@ -17,8 +17,9 @@ import java.util.logging.Level;
|
|||||||
|
|
||||||
public class Convert {
|
public class Convert {
|
||||||
protected static void convert() {
|
protected static void convert() {
|
||||||
File config = new File(Main.getPath(),"");
|
File path = new File(Main.getPath(),"");
|
||||||
if (config.exists()) convertTo4();
|
File file = new File(Main.getPath(), "config.yml");
|
||||||
|
if (path.exists() && file.exists()) convertTo4();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void convertTo4() {
|
private static void convertTo4() {
|
||||||
@ -26,7 +27,7 @@ public class Convert {
|
|||||||
File config = new File(Main.getPath(), "config.yml");
|
File config = new File(Main.getPath(), "config.yml");
|
||||||
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config);
|
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);
|
yamlConfiguration.set("ConfigVersion", null);
|
||||||
try {
|
try {
|
||||||
yamlConfiguration.save(config);
|
yamlConfiguration.save(config);
|
||||||
@ -36,6 +37,9 @@ public class Convert {
|
|||||||
|
|
||||||
File dir = new File(Main.getPath() + "/languages");
|
File dir = new File(Main.getPath() + "/languages");
|
||||||
File newDir = new File(Main.getPath() + "/OldConfig/Version3/languages");
|
File newDir = new File(Main.getPath() + "/OldConfig/Version3/languages");
|
||||||
|
if (!dir.exists()){
|
||||||
|
return;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
FileUtils.moveDirectory(dir, newDir);
|
FileUtils.moveDirectory(dir, newDir);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user