Fixed Updatr stuff

By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
Bukkit/Spigot 2011-01-05 23:00:13 +00:00
parent 88c998f4a2
commit 6f77375dc5
2 changed files with 15 additions and 6 deletions

View file

@ -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);
}
}
}

View file

@ -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);
}
}