Better display of BadCommandUsage message on paper server
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package fr.pandacube.lib.commands;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* Throw an instance of this exception to indicate to the plugin command handler that the user has missused the command.
|
||||
* The message, if provided, must indicate the reason of the mussusage of the command. It will be displayed on the
|
||||
* screen with eventual indications of how to use the command (help command for example).
|
||||
* If a {@link Throwable} cause is provided, it will be relayed to the plugin {@link Logger}.
|
||||
*
|
||||
*/
|
||||
public class BadCommandUsage extends RuntimeException {
|
||||
|
||||
public BadCommandUsage() {
|
||||
super();
|
||||
}
|
||||
|
||||
public BadCommandUsage(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
|
||||
public BadCommandUsage(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public BadCommandUsage(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user