Interface CommandBlockHolder
- All Known Subinterfaces:
CommandBlock, CommandMinecart
-
Method Summary
Modifier and TypeMethodDescriptionGets the command that this CommandBlock will run when powered.intGets the success count from this command block.Gets the last output from this command block.voidlastOutput(@Nullable Component lastOutput) Sets the last output from this command block.voidsetCommand(@Nullable String command) Sets the command that this CommandBlock will run when powered.voidsetSuccessCount(int successCount) Sets the success count from this command block.
-
Method Details
-
getCommand
String getCommand()Gets the command that this CommandBlock will run when powered. This will never return null. If the CommandBlock does not have a command, an empty String will be returned instead.- Returns:
- Command that this CommandBlock will run when activated.
-
setCommand
-
lastOutput
-
lastOutput
-
getSuccessCount
int getSuccessCount()Gets the success count from this command block.- Returns:
- the success count
- See Also:
-
setSuccessCount
void setSuccessCount(int successCount) Sets the success count from this command block.- Parameters:
successCount- the success count- See Also:
-