Adds basic plugin dependencies, courtesy of Raphfrk
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
@@ -8,6 +8,7 @@ import org.bukkit.*;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.plugin.InvalidDescriptionException;
|
||||
import org.bukkit.plugin.InvalidPluginException;
|
||||
import org.bukkit.plugin.UnknownDependencyException;
|
||||
|
||||
public class Getter {
|
||||
private Server server;
|
||||
@@ -40,6 +41,8 @@ public class Getter {
|
||||
File plugin = new File(DIRECTORY, name + ".jar");
|
||||
try {
|
||||
server.getPluginManager().loadPlugin(plugin);
|
||||
} catch (UnknownDependencyException ex) {
|
||||
server.getLogger().log(Level.SEVERE, null, ex);
|
||||
} catch (InvalidPluginException ex) {
|
||||
server.getLogger().log(Level.SEVERE, null, ex);
|
||||
} catch (InvalidDescriptionException ex) {
|
||||
|
||||
@@ -98,6 +98,8 @@ public class Updater {
|
||||
File plugin = new File(DIRECTORY, name + ".jar");
|
||||
try {
|
||||
server.getPluginManager().loadPlugin(plugin);
|
||||
} catch (UnknownDependencyException ex) {
|
||||
server.getLogger().log(Level.SEVERE, null, ex);
|
||||
} catch (InvalidPluginException ex) {
|
||||
server.getLogger().log(Level.SEVERE, null, ex);
|
||||
} catch (InvalidDescriptionException ex) {
|
||||
|
||||
Reference in New Issue
Block a user