Interface CommandBlockMinecart

All Superinterfaces:
Audience, BlockOccupiedMinecart, Contextual, CopyableDataHolder, DataHolder, DataHolder.Mutable, DataSerializable, Entity, EntityProjectileSource, HoverEventSource<HoverEvent.ShowEntity>, Identifiable, LocaleSource, Locatable, MinecartLike, Pointered, ProjectileSource, RandomProvider, SerializableDataHolder, SerializableDataHolder.Mutable, Sound.Emitter, Subject, TeamMember, ValueContainer, Vehicle

public interface CommandBlockMinecart extends BlockOccupiedMinecart, LocaleSource, Subject, Audience
Represents a Minecart with a CommandBlock inside it.
  • Method Details Link icon

    • storedCommand Link icon

      default Value.Mutable<String> storedCommand()
      Gets the currently stored command.
      Returns:
      The command
    • successCount Link icon

      default Value.Mutable<Integer> successCount()
      Gets the success count of the last executed command.

      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.

      Returns:
      The last success count
    • doesTrackOutput Link icon

      default Value.Mutable<Boolean> doesTrackOutput()
      Gets whether this command block will keep track of the output from the last command it executed.
      Returns:
      Whether the command output is tracked
    • lastOutput Link icon

      default Optional<Value.Mutable<Component>> lastOutput()
      Gets the last command output.

      This will only be available if doesTrackOutput() is set to true, otherwise Optional.empty() will be returned.

      Returns:
      The last command output, if available