aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/dev/isxander/yacl/config/GsonConfigInstance.java
diff options
context:
space:
mode:
authorisXander <xandersmith2008@gmail.com>2022-11-27 18:21:57 +0000
committerisXander <xandersmith2008@gmail.com>2022-11-27 18:21:57 +0000
commit5e7479e78f90e344e914aeac1297002fc274f32d (patch)
treeeb3d19d5485edad55deb0d12ad1a4489c1f3a90d /src/main/java/dev/isxander/yacl/config/GsonConfigInstance.java
parentd163b9128d760e53e34fd6c08dbf782fa3d50c51 (diff)
downloadYetAnotherConfigLib-5e7479e78f90e344e914aeac1297002fc274f32d.tar.gz
YetAnotherConfigLib-5e7479e78f90e344e914aeac1297002fc274f32d.tar.bz2
YetAnotherConfigLib-5e7479e78f90e344e914aeac1297002fc274f32d.zip
fix logger on config api and allow all envs
Diffstat (limited to 'src/main/java/dev/isxander/yacl/config/GsonConfigInstance.java')
-rw-r--r--src/main/java/dev/isxander/yacl/config/GsonConfigInstance.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/dev/isxander/yacl/config/GsonConfigInstance.java b/src/main/java/dev/isxander/yacl/config/GsonConfigInstance.java
index 40c2c99..3e075ab 100644
--- a/src/main/java/dev/isxander/yacl/config/GsonConfigInstance.java
+++ b/src/main/java/dev/isxander/yacl/config/GsonConfigInstance.java
@@ -1,7 +1,6 @@
package dev.isxander.yacl.config;
import com.google.gson.*;
-import dev.isxander.yacl.impl.utils.YACLConstants;
import net.minecraft.text.Style;
import net.minecraft.text.Text;
@@ -54,7 +53,7 @@ public class GsonConfigInstance<T> extends ConfigInstance<T> {
@Override
public void save() {
try {
- YACLConstants.LOGGER.info("Saving {}...", getConfigClass().getSimpleName());
+ logger.info("Saving {}...", getConfigClass().getSimpleName());
Files.writeString(path, gson.toJson(getConfig()), StandardOpenOption.TRUNCATE_EXISTING, StandardOpenOption.CREATE);
} catch (IOException e) {
e.printStackTrace();
@@ -69,7 +68,7 @@ public class GsonConfigInstance<T> extends ConfigInstance<T> {
return;
}
- YACLConstants.LOGGER.info("Loading {}...", getConfigClass().getSimpleName());
+ logger.info("Loading {}...", getConfigClass().getSimpleName());
setConfig(gson.fromJson(Files.readString(path), getConfigClass()));
} catch (IOException e) {
e.printStackTrace();