public class CommandInterruptException extends Exception
This exception is silently swallowed by the command processing handler.
| Constructor and Description |
|---|
CommandInterruptException(Consumer<org.bukkit.command.CommandSender> action) |
CommandInterruptException(String message) |
| Modifier and Type | Method and Description |
|---|---|
Consumer<org.bukkit.command.CommandSender> |
getAction() |
static void |
makeAssertion(boolean condition,
String failMsg)
Makes an assertion about a condition.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic CommandInterruptException(Consumer<org.bukkit.command.CommandSender> action)
public CommandInterruptException(String message)
public static void makeAssertion(boolean condition,
String failMsg)
throws CommandInterruptException
When used inside a command, command processing will be gracefully halted if the condition is not true.
condition - the conditionfailMsg - the message to send to the player if the assertion failsCommandInterruptException - if the assertion failspublic Consumer<org.bukkit.command.CommandSender> getAction()
Copyright © 2022. All rights reserved.