Refactored Plugin into an interface, make Javaplugin and relevant code to attempt to actually load plugins

By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
Bukkit/Spigot
2010-12-24 16:41:51 +00:00
parent e3d491491a
commit a28c9acb1b
10 changed files with 232 additions and 43 deletions
@@ -0,0 +1,35 @@
package org.bukkit.plugin;
/**
* Thrown when attempting to load an invalid Plugin file
*/
public class InvalidPluginException extends Exception {
private final Throwable cause;
/**
* Constructs a new InvalidPluginException based on the given Exception
*
* @param throwable Exception that triggered this Exception
*/
public InvalidPluginException(Throwable throwable) {
cause = throwable;
}
/**
* Constructs a new InvalidPluginException
*/
public InvalidPluginException() {
cause = null;
}
/**
* If applicable, returns the Exception that triggered this Exception
*
* @return Inner exception, or null if one does not exist
*/
@Override
public Throwable getCause() {
return cause;
}
}