[PR #7064] [MERGED] Add live force game mode management setting #7308

Closed
opened 2026-11-03 06:37:31 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7064
Author: @TiggerTakkyTTT
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: fix/server-management-force-game-mode


📝 Commits (1)

  • 138cbc1 Add live force game mode management setting

📊 Changes

7 files changed (+103 additions, -6 deletions)

View changed files

📝 crates/horizon-client/src/game/dedicated.rs (+3 -0)
📝 crates/horizon-client/src/game/dedicated/management.rs (+16 -0)
📝 crates/horizon-client/src/game/lan.rs (+10 -3)
📝 crates/horizon-server/src/management_methods.rs (+32 -0)
📝 tools/port_map/rest-013.tsv (+1 -1)
📝 tools/port_map/rest-017.tsv (+2 -1)
📝 tools/test_management_protocol_parity.py (+39 -1)

📄 Description

🤖 Opened by TiggerTakkyTTT's AI agent (Codex, GPT-6), not by TiggerTakkyTTT personally.

What and why

Add live minecraft:serversettings/force_game_mode get/set support. Setting it updates server.properties and server.toml, and enabling it applies the default game mode to players already online. Extend the management protocol parity harness to cover reads, changes, invalid input, persistence, and restart. Part of #6597.

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

MinecraftServerSettingsServiceImpl.forceGameMode, MinecraftServerSettingsServiceImpl.setForceGameMode, DedicatedServer.setForceGameMode, and MinecraftServer.enforceGameTypeForPlayers. Extended tools/test_management_protocol_parity.py against vanilla 26.3.

Other projects' code

None.

Self-check

  • python3 tools/pr_ready.py --quick --base upstream/main: public tree, Python tests, rustfmt, clippy, horizon-client/server tests, and doc tests passed. The final mod API check failed on two tests that also fail on unchanged upstream/main.
  • Live management protocol comparison: all 68 JSON-RPC replies and 6 connection/TLS checks matched vanilla; saved force-gamemode=true and the post-restart getter matched. The harness could not complete its separate schema comparison because the generated schema artifact is absent locally.
  • python3 tools/port_ledger.py map-check passed for both changed map files; the refreshed ledger maps the setting and enforcement methods without a gap for this change.
  • git diff --check and the commit hook's public-tree check passed.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/7064 **Author:** [@TiggerTakkyTTT](https://github.com/TiggerTakkyTTT) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/server-management-force-game-mode` --- ### 📝 Commits (1) - [`138cbc1`](https://github.com/horizon-rust/horizon/commit/138cbc12543d2dd34c39de32d3793facd2d6483a) Add live force game mode management setting ### 📊 Changes **7 files changed** (+103 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/dedicated.rs` (+3 -0) 📝 `crates/horizon-client/src/game/dedicated/management.rs` (+16 -0) 📝 `crates/horizon-client/src/game/lan.rs` (+10 -3) 📝 `crates/horizon-server/src/management_methods.rs` (+32 -0) 📝 `tools/port_map/rest-013.tsv` (+1 -1) 📝 `tools/port_map/rest-017.tsv` (+2 -1) 📝 `tools/test_management_protocol_parity.py` (+39 -1) </details> ### 📄 Description > 🤖 Opened by TiggerTakkyTTT's AI agent (Codex, GPT-6), not by TiggerTakkyTTT personally. ## What and why Add live `minecraft:serversettings/force_game_mode` get/set support. Setting it updates `server.properties` and `server.toml`, and enabling it applies the default game mode to players already online. Extend the management protocol parity harness to cover reads, changes, invalid input, persistence, and restart. Part of #6597. ## Kind - [x] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference `MinecraftServerSettingsServiceImpl.forceGameMode`, `MinecraftServerSettingsServiceImpl.setForceGameMode`, `DedicatedServer.setForceGameMode`, and `MinecraftServer.enforceGameTypeForPlayers`. Extended `tools/test_management_protocol_parity.py` against vanilla 26.3. ## Other projects' code None. ## Self-check - `python3 tools/pr_ready.py --quick --base upstream/main`: public tree, Python tests, rustfmt, clippy, horizon-client/server tests, and doc tests passed. The final mod API check failed on two tests that also fail on unchanged `upstream/main`. - Live management protocol comparison: all 68 JSON-RPC replies and 6 connection/TLS checks matched vanilla; saved `force-gamemode=true` and the post-restart getter matched. The harness could not complete its separate schema comparison because the generated schema artifact is absent locally. - `python3 tools/port_ledger.py map-check` passed for both changed map files; the refreshed ledger maps the setting and enforcement methods without a gap for this change. - `git diff --check` and the commit hook's public-tree check passed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:37:31 +07:00
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#7308
No description provided.