f00727c57e
Co-authored-by: Bjarne Koll <git@lynxplay.dev> Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> Co-authored-by: MiniDigger | Martin <admin@minidigger.dev> Co-authored-by: Nassim Jahnke <nassim@njahnke.dev> Co-authored-by: Noah van der Aa <ndvdaa@gmail.com> Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> Co-authored-by: Shane Freeder <theboyetronic@gmail.com> Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com> Co-authored-by: Tamion <70228790+notTamion@users.noreply.github.com> Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com>
54 lines
1.3 KiB
Java
54 lines
1.3 KiB
Java
package org.bukkit.event;
|
|
|
|
public class EventException extends Exception {
|
|
private static final long serialVersionUID = 3532808232324183999L;
|
|
private final Throwable cause;
|
|
|
|
/**
|
|
* Constructs a new EventException based on the given Exception
|
|
*
|
|
* @param throwable Exception that triggered this Exception
|
|
*/
|
|
public EventException(Throwable throwable) {
|
|
cause = throwable;
|
|
}
|
|
|
|
/**
|
|
* Constructs a new EventException
|
|
*/
|
|
public EventException() {
|
|
cause = null;
|
|
}
|
|
|
|
/**
|
|
* Constructs a new EventException with the given message
|
|
*
|
|
* @param cause The exception that caused this
|
|
* @param message The message
|
|
*/
|
|
public EventException(Throwable cause, String message) {
|
|
super(message);
|
|
this.cause = cause;
|
|
}
|
|
|
|
/**
|
|
* Constructs a new EventException with the given message
|
|
*
|
|
* @param message The message
|
|
*/
|
|
public EventException(String message) {
|
|
super(message);
|
|
cause = null;
|
|
}
|
|
|
|
/**
|
|
* If applicable, returns the Exception that triggered this Exception
|
|
*
|
|
* @return Inner exception, or {@code null} if one does not exist
|
|
*/
|
|
@Override
|
|
public Throwable getCause() {
|
|
return cause;
|
|
}
|
|
}
|