diff --git a/plugins/fancyvisuals/src/main/java/de/oliver/fancyvisuals/nametags/store/JsonNametagStore.java b/plugins/fancyvisuals/src/main/java/de/oliver/fancyvisuals/nametags/store/JsonNametagStore.java index 93c2f7d4..cf82ab8f 100644 --- a/plugins/fancyvisuals/src/main/java/de/oliver/fancyvisuals/nametags/store/JsonNametagStore.java +++ b/plugins/fancyvisuals/src/main/java/de/oliver/fancyvisuals/nametags/store/JsonNametagStore.java @@ -1,5 +1,6 @@ package de.oliver.fancyvisuals.nametags.store; +import de.oliver.fancyanalytics.logger.properties.ThrowableProperty; import de.oliver.fancyvisuals.FancyVisuals; import de.oliver.fancyvisuals.api.Context; import de.oliver.fancyvisuals.api.nametags.Nametag; @@ -28,7 +29,6 @@ public class JsonNametagStore implements NametagStore { jdb.set(context.getName() + "/" + id, nametag); } catch (IOException e) { FancyVisuals.getFancyLogger().error("Failed to set nametag for id " + id, ThrowableProperty.of(e)); - FancyVisuals.getFancyLogger().error(e); } } @@ -39,8 +39,7 @@ public class JsonNametagStore implements NametagStore { try { nametag = jdb.get(context.getName() + "/" + id, Nametag.class); } catch (IOException e) { - FancyVisuals.getFancyLogger().error("Failed to get nametag for id " + id); - FancyVisuals.getFancyLogger().error(e); + FancyVisuals.getFancyLogger().error("Failed to get nametag for id " + id, ThrowableProperty.of(e)); } return nametag; @@ -58,8 +57,7 @@ public class JsonNametagStore implements NametagStore { try { jdb.getAll(context.getName(), Nametag.class); } catch (IOException e) { - FancyVisuals.getFancyLogger().error("Failed to get all nametags"); - FancyVisuals.getFancyLogger().error(e); + FancyVisuals.getFancyLogger().error("Failed to get all nametags", ThrowableProperty.of(e)); } return nametags; diff --git a/plugins/fancyvisuals/src/main/java/de/oliver/fancyvisuals/playerConfig/JsonPlayerConfigStore.java b/plugins/fancyvisuals/src/main/java/de/oliver/fancyvisuals/playerConfig/JsonPlayerConfigStore.java index 56f2daed..701e14b6 100644 --- a/plugins/fancyvisuals/src/main/java/de/oliver/fancyvisuals/playerConfig/JsonPlayerConfigStore.java +++ b/plugins/fancyvisuals/src/main/java/de/oliver/fancyvisuals/playerConfig/JsonPlayerConfigStore.java @@ -1,5 +1,6 @@ package de.oliver.fancyvisuals.playerConfig; +import de.oliver.fancyanalytics.logger.properties.ThrowableProperty; import de.oliver.fancyvisuals.FancyVisuals; import de.oliver.jdb.JDB; import org.jetbrains.annotations.NotNull; @@ -37,8 +38,7 @@ public class JsonPlayerConfigStore { try { playerConfig = jdb.get(uuid.toString(), PlayerConfig.class); } catch (Exception e) { - FancyVisuals.getFancyLogger().error("Failed to get player config for uuid " + uuid); - FancyVisuals.getFancyLogger().error(e); + FancyVisuals.getFancyLogger().error("Failed to get player config for uuid " + uuid, ThrowableProperty.of(e)); } return playerConfig != null ? playerConfig : getDefaultPlayerConfig(); @@ -54,8 +54,7 @@ public class JsonPlayerConfigStore { try { jdb.set(uuid.toString(), playerConfig); } catch (Exception e) { - FancyVisuals.getFancyLogger().error("Failed to set player config for uuid " + uuid); - FancyVisuals.getFancyLogger().error(e); + FancyVisuals.getFancyLogger().error("Failed to set player config for uuid " + uuid, ThrowableProperty.of(e)); } } @@ -80,8 +79,7 @@ public class JsonPlayerConfigStore { try { playerConfig = jdb.get("default", PlayerConfig.class); } catch (Exception e) { - FancyVisuals.getFancyLogger().error("Failed to get default player config"); - FancyVisuals.getFancyLogger().error(e); + FancyVisuals.getFancyLogger().error("Failed to get default player config", ThrowableProperty.of(e)); } if (playerConfig == null) { @@ -90,8 +88,7 @@ public class JsonPlayerConfigStore { try { jdb.set("default", DEFAULT_PLAYER_CONFIG); } catch (Exception e) { - FancyVisuals.getFancyLogger().error("Failed to set default player config"); - FancyVisuals.getFancyLogger().error(e); + FancyVisuals.getFancyLogger().error("Failed to set default player config", ThrowableProperty.of(e)); } }