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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user