Skip to content

Commit bd002bb

Browse files
committed
Added that nifty config updater.
1 parent 00705c9 commit bd002bb

File tree

6 files changed

+6
-0
lines changed

6 files changed

+6
-0
lines changed
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

src/main/java/dev/arcticgaming/opentickets/OpenTickets.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public void onEnable() {
3636

3737
getConfig();
3838
saveDefaultConfig();
39+
updateConfigWithNewOptions();
3940

4041
//Get Config Options for coloration
4142
PRIMARY_COLOR = TextColor.fromHexString(getConfig().getString("Colors.primary_color"));
@@ -101,4 +102,9 @@ public static void createSupportGroups() {
101102
}
102103
}
103104
}
105+
106+
private void updateConfigWithNewOptions() {
107+
plugin.getConfig().options().copyDefaults(true);
108+
plugin.saveConfig();
109+
}
104110
}

0 commit comments

Comments
 (0)