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

View File

@@ -5,30 +5,31 @@ package org.bukkit.plugin;
* Thrown when attempting to load an invalid PluginDescriptionFile
*/
public class InvalidDescriptionException extends Exception {
private final Exception innerException;
private final Throwable cause;
/**
* Constructs a new InvalidDescriptionException based on the given Exception
*
* @param exception Exception that triggered this Exception
* @param throwable Exception that triggered this Exception
*/
public InvalidDescriptionException(Exception exception) {
innerException = exception;
public InvalidDescriptionException(Throwable throwable) {
cause = throwable;
}
/**
* Constructs a new InvalidDescriptionException
*/
public InvalidDescriptionException() {
innerException = null;
cause = null;
}
/**
* If applicable, returns the Exception that triggered this InvalidDescriptionException
* If applicable, returns the Exception that triggered this Exception
*
* @return Inner exception, or null if one does not exist
*/
public Exception getInnerException() {
return innerException;
@Override
public Throwable getCause() {
return cause;
}
}