Class CommandResult
java.lang.Object
me.internalizable.numdrassl.api.command.CommandResult
Represents the result of a command execution.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic CommandResultfailure()A failed command result.static CommandResultA failed command result with a message.Get the message associated with this result.Get the status of this result.booleanCheck if the command was successful.static CommandResultA result indicating insufficient permissions.static CommandResultnotFound()A result indicating the command was not found.static CommandResultsuccess()A successful command result.static CommandResultA successful command result with a message.
-
Method Details
-
getStatus
-
getMessage
Get the message associated with this result.- Returns:
- the message, or null
-
isSuccess
public boolean isSuccess()Check if the command was successful.- Returns:
- true if successful
-
success
-
success
A successful command result with a message.- Parameters:
message- the success message- Returns:
- success result
-
failure
-
failure
A failed command result with a message.- Parameters:
message- the error message- Returns:
- failure result
-
notFound
A result indicating the command was not found.- Returns:
- not found result
-
noPermission
A result indicating insufficient permissions.- Returns:
- no permission result
-