version 1.1 release
This commit is contained in:
		| @@ -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; | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user