Interface CommandExceptionHandler
public interface CommandExceptionHandler
Turns the command framework's failures into messages a player can read, in their own language.
-
Method Summary
Modifier and TypeMethodDescriptionvoidhandleArgumentParseException(org.incendo.cloud.exception.handling.ExceptionContext<FPlayer, org.incendo.cloud.exception.ArgumentParseException> context) Reports an argument that could not be parsed.voidhandleCommandExecutionException(org.incendo.cloud.exception.handling.ExceptionContext<FPlayer, org.incendo.cloud.exception.CommandExecutionException> context) Reports a command that threw while running, and logs the cause.voidhandleInvalidSyntaxException(org.incendo.cloud.exception.handling.ExceptionContext<FPlayer, org.incendo.cloud.exception.InvalidSyntaxException> context) Reports a command used with the wrong syntax, showing the correct form.voidhandleNoPermissionException(org.incendo.cloud.exception.handling.ExceptionContext<FPlayer, org.incendo.cloud.exception.NoPermissionException> context) Reports a command the player is not allowed to run.
-
Method Details
-
handleArgumentParseException
void handleArgumentParseException(org.incendo.cloud.exception.handling.ExceptionContext<FPlayer, org.incendo.cloud.exception.ArgumentParseException> context) Reports an argument that could not be parsed.- Parameters:
context- the failure and who caused it
-
handleInvalidSyntaxException
void handleInvalidSyntaxException(org.incendo.cloud.exception.handling.ExceptionContext<FPlayer, org.incendo.cloud.exception.InvalidSyntaxException> context) Reports a command used with the wrong syntax, showing the correct form.- Parameters:
context- the failure and who caused it
-
handleNoPermissionException
void handleNoPermissionException(org.incendo.cloud.exception.handling.ExceptionContext<FPlayer, org.incendo.cloud.exception.NoPermissionException> context) Reports a command the player is not allowed to run.- Parameters:
context- the failure and who caused it
-
handleCommandExecutionException
void handleCommandExecutionException(org.incendo.cloud.exception.handling.ExceptionContext<FPlayer, org.incendo.cloud.exception.CommandExecutionException> context) Reports a command that threw while running, and logs the cause.- Parameters:
context- the failure and who caused it
-