diff options
Diffstat (limited to 'src/main/java/dev/isxander/yacl/config/NbtConfigInstance.java')
-rw-r--r-- | src/main/java/dev/isxander/yacl/config/NbtConfigInstance.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/main/java/dev/isxander/yacl/config/NbtConfigInstance.java b/src/main/java/dev/isxander/yacl/config/NbtConfigInstance.java index 5749695..8f817cb 100644 --- a/src/main/java/dev/isxander/yacl/config/NbtConfigInstance.java +++ b/src/main/java/dev/isxander/yacl/config/NbtConfigInstance.java @@ -1,6 +1,5 @@ package dev.isxander.yacl.config; -import dev.isxander.yacl.impl.utils.YACLConstants; import net.minecraft.nbt.*; import java.awt.*; @@ -58,13 +57,13 @@ public class NbtConfigInstance<T> extends ConfigInstance<T> { @Override public void save() { - YACLConstants.LOGGER.info("Saving {}...", getConfigClass().getSimpleName()); + logger.info("Saving {}...", getConfigClass().getSimpleName()); NbtCompound nbt; try { nbt = (NbtCompound) serializeObject(getConfig(), nbtSerializerHolder, field -> field.isAnnotationPresent(ConfigEntry.class)); } catch (IllegalAccessException e) { - YACLConstants.LOGGER.error("Failed to convert '{}' -> NBT", getConfigClass().getName(), e); + logger.error("Failed to convert '{}' -> NBT", getConfigClass().getName(), e); return; } @@ -77,7 +76,7 @@ public class NbtConfigInstance<T> extends ConfigInstance<T> { else NbtIo.write(nbt, new DataOutputStream(fos)); } catch (IOException e) { - YACLConstants.LOGGER.error("Failed to write NBT to '{}'", path, e); + logger.error("Failed to write NBT to '{}'", path, e); } } @@ -88,19 +87,19 @@ public class NbtConfigInstance<T> extends ConfigInstance<T> { return; } - YACLConstants.LOGGER.info("Loading {}...", getConfigClass().getSimpleName()); + logger.info("Loading {}...", getConfigClass().getSimpleName()); NbtCompound nbt; try { nbt = compressed ? NbtIo.readCompressed(path.toFile()) : NbtIo.read(path.toFile()); } catch (IOException e) { - YACLConstants.LOGGER.error("Failed to read NBT file '{}'", path, e); + logger.error("Failed to read NBT file '{}'", path, e); return; } try { setConfig(deserializeObject(nbt, getConfigClass(), nbtSerializerHolder, field -> field.isAnnotationPresent(ConfigEntry.class))); } catch (InvocationTargetException | NoSuchMethodException | InstantiationException | IllegalAccessException e) { - YACLConstants.LOGGER.error("Failed to convert NBT -> '{}'", getConfigClass().getName(), e); + logger.error("Failed to convert NBT -> '{}'", getConfigClass().getName(), e); } } |