From a38f309453999abff0094d6c301811ea9b1a3d7a Mon Sep 17 00:00:00 2001 From: Phoenix616 Date: Wed, 1 Mar 2023 18:11:35 +0100 Subject: [PATCH] Cleanup: Properly log errors --- .../ChestShop/Listeners/Modules/PriceRestrictionModule.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/Acrobot/ChestShop/Listeners/Modules/PriceRestrictionModule.java b/src/main/java/com/Acrobot/ChestShop/Listeners/Modules/PriceRestrictionModule.java index 91193ea..1c30511 100644 --- a/src/main/java/com/Acrobot/ChestShop/Listeners/Modules/PriceRestrictionModule.java +++ b/src/main/java/com/Acrobot/ChestShop/Listeners/Modules/PriceRestrictionModule.java @@ -58,7 +58,7 @@ public class PriceRestrictionModule implements Listener { configuration.options().copyDefaults(true); configuration.save(ChestShop.loadFile("priceLimits.yml")); } catch (IOException e) { - e.printStackTrace(); + ChestShop.getBukkitLogger().log(Level.SEVERE, "Error while loading priceLimits.yml", e); } } else if (!configuration.getBoolean("uses_materials")) { Material testMat = Material.matchMaterial("1"); @@ -73,7 +73,7 @@ public class PriceRestrictionModule implements Listener { configuration.save(file); ChestShop.getBukkitLogger().log(Level.INFO, "Conversion finished!"); } catch (IOException e) { - e.printStackTrace(); + ChestShop.getBukkitLogger().log(Level.SEVERE, "Error while converting priceLimits.yml", e); } } else { ChestShop.getBukkitLogger().log(Level.WARNING, "Could not convert numeric IDs in priceLimits.yml to Material names!");