version 1.1 release

This commit is contained in:
2023-05-17 17:09:05 +02:00
parent 4702589c25
commit dd713732c6
3 changed files with 16 additions and 3 deletions

View File

@@ -12,6 +12,7 @@ import java.io.IOException;
public class Config {
private static Config instance;
private World start_world;
private boolean bungeecordEnabled = false;
public static Config getInstance() {
if (instance == null) instance = new Config();
return instance;
@@ -28,6 +29,7 @@ public class Config {
System.out.println("no starting world set");
System.exit(0);
}
this.bungeecordEnabled = config.get("bungeecord").getAsBoolean();
}catch (IOException e) {
e.printStackTrace();
@@ -41,7 +43,8 @@ public class Config {
FileWriter fileWriter = new FileWriter("config.json");
String default_config = """
{
"start_world": "world"
"start_world": "world",
"bungeecord": false
}""";
fileWriter.write(default_config);
fileWriter.close();
@@ -54,4 +57,8 @@ public class Config {
public World getStart_world() {
return start_world;
}
public boolean isBungeecordEnabled() {
return bungeecordEnabled;
}
}