[FIX] Исправлено форматирование при сохранении конфигурации

This commit is contained in:
Gravit 2019-05-31 05:42:51 +07:00
parent 4af4a002a7
commit 27db641eae
No known key found for this signature in database
GPG key ID: 061981E1E85D3216

View file

@ -33,7 +33,7 @@ public JsonConfigurable(Type type, Path configPath) {
@LauncherAPI
public void saveConfig(Path configPath) throws IOException {
try (BufferedWriter writer = IOHelper.newWriter(configPath)) {
Launcher.gsonManager.gson.toJson(getConfig(), type, writer);
Launcher.gsonManager.configGson.toJson(getConfig(), type, writer);
}
}
@ -41,7 +41,7 @@ public void saveConfig(Path configPath) throws IOException {
public void loadConfig(Path configPath) throws IOException {
if (generateConfigIfNotExists(configPath)) return;
try (BufferedReader reader = IOHelper.newReader(configPath)) {
setConfig(Launcher.gsonManager.gson.fromJson(reader, type));
setConfig(Launcher.gsonManager.configGson.fromJson(reader, type));
}
}