From 6f77375dc5729f0349c77fd6ced55e21cdba695a Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Wed, 5 Jan 2011 23:00:13 +0000 Subject: [PATCH] Fixed Updatr stuff By: Dinnerbone --- .../src/main/java/org/bukkit/fillr/Getter.java | 13 +++++++++---- .../src/main/java/org/bukkit/fillr/Updater.java | 8 ++++++-- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/paper-api/src/main/java/org/bukkit/fillr/Getter.java b/paper-api/src/main/java/org/bukkit/fillr/Getter.java index f38eda4557..1bbd5b4c27 100644 --- a/paper-api/src/main/java/org/bukkit/fillr/Getter.java +++ b/paper-api/src/main/java/org/bukkit/fillr/Getter.java @@ -1,8 +1,11 @@ package org.bukkit.fillr; import java.io.File; +import java.util.logging.Level; +import java.util.logging.Logger; import org.bukkit.*; +import org.bukkit.plugin.InvalidDescriptionException; import org.bukkit.plugin.InvalidPluginException; public class Getter { @@ -25,8 +28,8 @@ public class Getter { player.sendMessage("Finished Download!"); enablePlugin(reader); player.sendMessage("Loading " + reader.getName()); - } catch (Exception e) { - e.printStackTrace(); + } catch (Exception ex) { + Logger.getLogger(Getter.class.getName()).log(Level.SEVERE, null, ex); } } @@ -36,8 +39,10 @@ public class Getter { File plugin = new File(directory, name + ".jar"); try { server.getPluginManager().loadPlugin(plugin); - } catch (InvalidPluginException e) { - e.printStackTrace(); + } catch (InvalidPluginException ex) { + Logger.getLogger(Getter.class.getName()).log(Level.SEVERE, null, ex); + } catch (InvalidDescriptionException ex) { + Logger.getLogger(Getter.class.getName()).log(Level.SEVERE, null, ex); } } } diff --git a/paper-api/src/main/java/org/bukkit/fillr/Updater.java b/paper-api/src/main/java/org/bukkit/fillr/Updater.java index c429ed908c..1ca26b60a2 100644 --- a/paper-api/src/main/java/org/bukkit/fillr/Updater.java +++ b/paper-api/src/main/java/org/bukkit/fillr/Updater.java @@ -4,6 +4,8 @@ import org.bukkit.*; import org.bukkit.plugin.*; import java.io.File; +import java.util.logging.Level; +import java.util.logging.Logger; public class Updater { public static String directory = Fillr.directory; @@ -95,8 +97,10 @@ public class Updater { File plugin = new File(directory, name + ".jar"); try { server.getPluginManager().loadPlugin(plugin); - } catch (InvalidPluginException e) { - e.printStackTrace(); + } catch (InvalidPluginException ex) { + Logger.getLogger(Getter.class.getName()).log(Level.SEVERE, null, ex); + } catch (InvalidDescriptionException ex) { + Logger.getLogger(Getter.class.getName()).log(Level.SEVERE, null, ex); } }