public class CommandResult extends Object
Modifier and Type | Class and Description |
---|---|
static class |
CommandResult.Builder
A builder for
CommandResult s. |
Modifier and Type | Method and Description |
---|---|
static CommandResult |
affectedBlocks(int count)
Returns a result indicating the command was processed with an
amount of affected blocks.
|
static CommandResult |
affectedEntities(int count)
Returns a result indicating the command was processed with an
amount of affected entities.
|
static CommandResult |
affectedItems(int count)
Returns a result indicating the command was processed with an
amount of affected items.
|
static CommandResult.Builder |
builder()
Returns a
CommandResult.Builder . |
static CommandResult |
empty()
Returns a new
CommandResult indicating that a command was
processed. |
Optional<Integer> |
getAffectedBlocks()
Gets the number of blocks affected by the command.
|
Optional<Integer> |
getAffectedEntities()
Gets the number of entities affected by the command.
|
Optional<Integer> |
getAffectedItems()
Gets the number of items affected by the command.
|
Optional<Integer> |
getQueryResult()
Gets the query result of the command, e.g.
|
Optional<Integer> |
getSuccessCount()
Gets the success count of the command.
|
static CommandResult |
queryResult(int count)
Returns a result indicating the command was processed with an
amount of queries.
|
static CommandResult |
success()
Returns a result indicating the command was processed with a single
success.
|
static CommandResult |
successCount(int count)
Returns a result indicating the command was processed with a single
success.
|
public static CommandResult.Builder builder()
CommandResult.Builder
.public static CommandResult empty()
CommandResult
indicating that a command was
processed.public static CommandResult success()
public static CommandResult successCount(int count)
count
- The success countpublic static CommandResult affectedBlocks(int count)
count
- The amount of blocks affectedpublic static CommandResult affectedEntities(int count)
count
- The amount of entities affectedpublic static CommandResult affectedItems(int count)
count
- The amount of items affectedpublic static CommandResult queryResult(int count)
count
- The amount of queriespublic Optional<Integer> getSuccessCount()
public Optional<Integer> getAffectedBlocks()
public Optional<Integer> getAffectedEntities()
public Optional<Integer> getAffectedItems()