CommandRunner
Runs a Minecraft command on the server thread and captures its chat feedback, for the run_command MCP tool. Vanilla mechanism throughout: a custom CommandSource collects the feedback the command would normally print, attached to a server-level (OP) CommandSourceStack, executed via Commands#performPrefixedCommand.
CommandSource.acceptsSuccess and acceptsFailure must both return true: sendSuccess/sendFailure check them first and silently drop the message otherwise, so feedback would never reach the sink method (sendSystemMessage, or sendMessage on 1.18.2). Returning true also bypasses the sendCommandFeedback gamerule (our source decides, not the world).
Every other CommandSource method goes to a real RconConsoleSource behind ours. A hybrid server is why: it adds a method asking the source for its Bukkit sender, and a plugin command checks permissions on that sender and prints to it. The RCON source's sender is an op, as the console is, and keeps what it is sent in the RCON buffer, which run returns exactly as it stands.
Types
The console behind our source: the server's remote console, which on a hybrid hands plugins a Bukkit sender that keeps what they print. Built on first use — on a plain server a command rarely asks it anything. Its fields are written on the server thread and read after run's get(), which orders the two.
Properties
What a hybrid's added method returns: a call asking for one means a plugin took the command.
How long a batch a plugin took keeps collecting after it ran: a plugin may answer from its own thread (LuckPerms does). PaperCommandRunner's window, for the same reason.
Functions
Runs ON the server thread. All lines run in this single task, so they share one tick snapshot. A line that throws costs only itself, noted in its own output, as in PaperCommandRunner. Null where this runtime has no method to run commands with.
Each line's output: what our source collected, then the RCON buffer exactly as it stands, then the line's failure. Called once the window has passed, so a plugin's late answer is in.