[GH-ISSUE #5316] Dedicated server: /op, /deop, /pardon and /whitelist suggest only "Player" (the answer uses the host's registries) #1636

Closed
opened 2026-11-02 15:48:33 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Detimes on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5316

Originally assigned to: @Detimes on GitHub.

🤖 Filed by Detimes' AI agent (Claude Code, Claude Sonnet 5.5), not by Detimes personally.

Corrected after the first version: the first text said the command tree does not mark these nodes for the server. That was wrong: the tree sent to clients already marks them minecraft:ask_server (crates/horizon-client/src/lan/command_suggestions.rs, generated from vanilla). The defect is in the server's answer, below.

What happens

On a dedicated server, tab completion of /op offers no player names, only Player. Testers on a Horizon server (behind a Velocity proxy, three players online, two of them not operators) reported exactly that; I have not seen the client side myself, but the code explains it.

The client sees ask_server on the targets of /op, /deop, /pardon, /whitelist add, /whitelist remove and the target of /pardon-ip, so it asks the server. guest_suggestions (crates/horizon-client/src/game/lan_actions.rs) answers by running the command tree over the server process's own registries. On a dedicated server those registries have players = [PLAYER_NAME] from build_registries (game/chat.rs), the name of a local player that does not exist there, and the argument type's default completion lists that. Nothing sets the real online players, and the tree has no provider for the operator, ban and whitelist lists.

Vanilla 26.3 answers these from the server's lists (read from the pinned bytecode with javap):

Command Vanilla suggests
/op PlayerList.getPlayers() that are not operators (isOp)
/deop PlayerList.getOpNames()
/pardon UserBanList.getUserList()
/pardon-ip IpBanList.getUserList()
/whitelist add getPlayers() that are not whitelisted (UserWhiteList.isWhiteListed)
/whitelist remove PlayerList.getWhiteListNames()

Expected (vanilla)

/op lists the online players who are not operators; /deop lists the operators; the others list what the table says.

The same wrong list should also reach every other ask_server node that completes player names from the registries (for example scoreboard players ... targets), so the first part of the fix, answering with the real online players, covers those too.

Plan

Answer a guest's request with the server's real online players, and give the six nodes vanilla's providers over the operators, banned names and addresses, and the whitelist the dedicated server holds. A test per command, and an e2e check against a running dedicated server. I am claiming this issue and will send the pull request.

Originally created by @Detimes on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5316 Originally assigned to: @Detimes on GitHub. > 🤖 Filed by Detimes' AI agent (Claude Code, Claude Sonnet 5.5), not by Detimes personally. **Corrected after the first version:** the first text said the command tree does not mark these nodes for the server. That was wrong: the tree sent to clients already marks them `minecraft:ask_server` (`crates/horizon-client/src/lan/command_suggestions.rs`, generated from vanilla). The defect is in the server's answer, below. ### What happens On a dedicated server, tab completion of `/op` offers no player names, only `Player`. Testers on a Horizon server (behind a Velocity proxy, three players online, two of them not operators) reported exactly that; I have not seen the client side myself, but the code explains it. The client sees `ask_server` on the `targets` of `/op`, `/deop`, `/pardon`, `/whitelist add`, `/whitelist remove` and the `target` of `/pardon-ip`, so it asks the server. `guest_suggestions` (`crates/horizon-client/src/game/lan_actions.rs`) answers by running the command tree over the server process's own registries. On a dedicated server those registries have `players = [PLAYER_NAME]` from `build_registries` (`game/chat.rs`), the name of a local player that does not exist there, and the argument type's default completion lists that. Nothing sets the real online players, and the tree has no provider for the operator, ban and whitelist lists. Vanilla 26.3 answers these from the server's lists (read from the pinned bytecode with `javap`): | Command | Vanilla suggests | | --- | --- | | `/op` | `PlayerList.getPlayers()` that are not operators (`isOp`) | | `/deop` | `PlayerList.getOpNames()` | | `/pardon` | `UserBanList.getUserList()` | | `/pardon-ip` | `IpBanList.getUserList()` | | `/whitelist add` | `getPlayers()` that are not whitelisted (`UserWhiteList.isWhiteListed`) | | `/whitelist remove` | `PlayerList.getWhiteListNames()` | ### Expected (vanilla) `/op ` lists the online players who are not operators; `/deop ` lists the operators; the others list what the table says. The same wrong list should also reach every other `ask_server` node that completes player names from the registries (for example `scoreboard players ... targets`), so the first part of the fix, answering with the real online players, covers those too. ### Plan Answer a guest's request with the server's real online players, and give the six nodes vanilla's providers over the operators, banned names and addresses, and the whitelist the dedicated server holds. A test per command, and an e2e check against a running dedicated server. I am claiming this issue and will send the pull request.
Author
Owner

@Detimes commented on GitHub (Oct 31, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6546905217 --> @Detimes commented on GitHub (Oct 31, 2026): 🤖 Agent: /claim
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#1636
No description provided.