Class CommandResult
java.lang.Object
dev.ua.theroer.magicutils.commands.CommandResult
Represents the result of a command execution, including status and message.
-
Method Summary
Modifier and TypeMethodDescriptionstatic CommandResultfailure(boolean sendMessage) Creates a failed CommandResult with a sendMessage option.static CommandResultCreates a failed CommandResult with a message.static CommandResultCreates a failed CommandResult with a message and prefix option.static CommandResultnotFound()Creates a CommandResult for a not found command.static CommandResultsuccess()Creates a successful CommandResult with no message.static CommandResultCreates a successful CommandResult with message and sendMessage option.static CommandResultCreates a successful CommandResult with a message.static CommandResultCreates a successful CommandResult with a message and prefix option.
-
Method Details
-
success
Creates a successful CommandResult with no message.- Returns:
- a successful CommandResult
-
success
Creates a successful CommandResult with a message.- Parameters:
message- the result message- Returns:
- a successful CommandResult
-
success
Creates a successful CommandResult with a message and prefix option.- Parameters:
message- the result messagesendPrefix- whether to send the prefix- Returns:
- a successful CommandResult
-
success
Creates a successful CommandResult with message and sendMessage option.- Parameters:
sendMessage- whether to send the messagemessage- the result message- Returns:
- a successful CommandResult
-
failure
Creates a failed CommandResult with a message.- Parameters:
message- the failure message- Returns:
- a failed CommandResult
-
failure
Creates a failed CommandResult with a message and prefix option.- Parameters:
message- the failure messagesendPrefix- whether to send the prefix- Returns:
- a failed CommandResult
-
failure
Creates a failed CommandResult with a sendMessage option.- Parameters:
sendMessage- whether to send the message- Returns:
- a failed CommandResult
-
notFound
Creates a CommandResult for a not found command.- Returns:
- a not found CommandResult
-