public interface ImmutableCommandData extends ImmutableDataManipulator<ImmutableCommandData,CommandData>
ImmutableDataManipulator
handling all related
ImmutableValue
s for command related DataHolder
s, such as
CommandBlock
s and CommandBlockMinecart
s.Modifier and Type | Method and Description |
---|---|
ImmutableValue<Boolean> |
doesTrackOutput()
Gets whether this command block will keep track of the output from the
last command it executed.
|
ImmutableOptionalValue<Text> |
lastOutput()
Gets the last command output.
|
ImmutableValue<String> |
storedCommand()
Gets the currently stored command.
|
ImmutableValue<Integer> |
successCount()
Gets the success count of the last executed command.
|
asMutable, copy, with, with
getContentVersion, toContainer
ImmutableValue<String> storedCommand()
ImmutableValue<Integer> successCount()
The success count is the number of times the most recently used command of this command block succeeded. Most commands can only succeed once per execution, but certain commands (such as those which accept players as arguments) can succeed multiple times, and this value will be set accordingly. This success count can also be polled via a redstone comparator.
ImmutableValue<Boolean> doesTrackOutput()
ImmutableOptionalValue<Text> lastOutput()
This will only be available if doesTrackOutput()
is set to
true, otherwise Optional.empty()
will be returned.