Public: anyone can read this; the crew can change it.

Games: installing the quality set ships Essential Commands' config with only /home, /spawn and /tpa on #18199

opened this

Merged 4h 22m ago, live in production

Installing the quality set now writes Essential Commands' config in the same commit as the install. The mod's key names are unconfirmed (see "Not done"). tsc is clean, the 67 tests in test/game-mods.test.ts and the other games test files pass, and the gate's 38 rules show 0 fail.

Notes

opened this

Installing the quality set now writes Essential Commands' config in the same commit as the install. The mod's key names are unconfirmed (see "Not done"). tsc is clean, the 67 tests in test/game-mods.test.ts and the other games test files pass, and the gate's 38 rules show 0 fail. I did not run the full suite.

What changed

  • Config file: src/games/mod_sets.ts gives the quality set a configs entry for essential-commands. It writes config/EssentialCommands.properties with enable_home, enable_spawn and enable_tpa set to true. Every other enable_* the mod might read is false (a longer list than the issue's minimum), and use_permissions_api=false.
  • Plan and commit: planSet in src/games/mods.ts adds that file to the plan and the commit through the existing withConfig path. The page and the terminal show it on a "Writes config/EssentialCommands.properties …" line. Nothing is written when the install leaves Essential Commands out, or when it is already installed.
  • Plan type: I changed Plan.config to a configs list, since a set can write several. Spark's install and src/games/presets.ts use the list now.
  • Removed: the owner-must line for Essential Commands is gone from mod_sets.ts and docs/features/game-mods.md. The set's description now names /home, /spawn and /tpa, and the doc explains the new behaviour.
  • Tests: a test in test/game-mods.test.ts installs the set and reads the written config back from the compose file. It fails if the file is missing or if any enable_* other than home, spawn and tpa is true. It also checks that the written file, not just the plan, has use_permissions_api=false. A second case checks that no file is written when Essential Commands is already installed. I replaced the old "trim it before players join" test. Other tests in that file depend on state left by earlier ones, so one terminal-flow wait now waits for the set's own "installed" text.

Not done

  • The key names are unconfirmed against the mod, and a key it does not read is ignored silently. Try /home on the first start; the doc says so too.
  • Removing Essential Commands later leaves its config file in the repository. Config removal isn't tied to mod removal yet.
  • No new function, so I did not run scripts/similar.ts.

Try it Open /games/net/<server>?add=set:quality on a Fabric server. The plan shows the Writes line, and confirming it commits the config with the install.

Closes #18195

2 earlier comments
commented

Installing the quality set now writes Essential Commands' config in the same commit as the install. The mod's key names are unconfirmed (see "Not done"). tsc is clean, the 67 tests in test/game-mods.test.ts and the other games test files pass, and the gate's 38 rules show 0 fail. I did not run the full suite.

What changed

  • Config file: src/games/mod_sets.ts gives the quality set a configs entry for essential-commands. It writes config/EssentialCommands.properties with enable_home, enable_spawn and enable_tpa set to true. Every other enable_* the mod might read is false (a longer list than the issue's minimum), and use_permissions_api=false.
  • Plan and commit: planSet in src/games/mods.ts adds that file to the plan and the commit through the existing withConfig path. The page and the terminal show it on a "Writes config/EssentialCommands.properties …" line. Nothing is written when the install leaves Essential Commands out, or when it is already installed.
  • Plan type: I changed Plan.config to a configs list, since a set can write several. Spark's install and src/games/presets.ts use the list now.
  • Removed: the owner-must line for Essential Commands is gone from mod_sets.ts and docs/features/game-mods.md. The set's description now names /home, /spawn and /tpa, and the doc explains the new behaviour.
  • Tests: a test in test/game-mods.test.ts installs the set and reads the written config back from the compose file. It fails if the file is missing or if any enable_* other than home, spawn and tpa is true. It also checks that the written file, not just the plan, has use_permissions_api=false. A second case checks that no file is written when Essential Commands is already installed. I replaced the old "trim it before players join" test. Other tests in that file depend on state left by earlier ones, so one terminal-flow wait now waits for the set's own "installed" text.

Not done

  • The key names are unconfirmed against the mod, and a key it does not read is ignored silently. Try /home on the first start; the doc says so too.
  • Removing Essential Commands later leaves its config file in the repository. Config removal isn't tied to mod removal yet.
  • No new function, so I did not run scripts/similar.ts.

Try it Open /games/net/<server>?add=set:quality on a Fabric server. The plan shows the Writes line, and confirming it commits the config with the install.

commented

I removed the dead code and cut the key list, but I could not confirm any key name against the mod itself. tsc and test/game-mods.test.ts pass, and gate.ts --fix had nothing to change.

Key names (not done as asked):

  • This sandbox can reach only the forge and the package registry, so Essential Commands' source and default config were out of reach. I did not guess at them.
  • I cut the list to the issue's 16 minimum off names: back, warp, nick, rtp, fly, workbench, enderchest, top, gamemode, afk, invuln, day, night, feed, heal, repair. I took out the roughly 34 extras, including the invented-looking ec, spawn_set, time, weather and sudo.
  • enable_home, enable_spawn and enable_tpa stay on, and use_permissions_api=false stays.
  • A comment in src/games/mod_sets.ts says plainly that the names come from the issue and are unconfirmed against the mod's own config. docs/features/game-mods.md says the same and tells owners to try the commands on first start.
  • I found no mod-wide switch, so I used none.

Please check the keys: someone who can read the mod's default config should confirm the 16 names before this lands. A wrong name is ignored by the mod, and that command stays on.

Dead code:

  • ModSet.cautions, its "Before players join" line in planSet (src/games/mods.ts) and the test assertion for that line are gone.
  • The doc now says that removing Essential Commands later leaves its config in the repository.
  • The commit line says No door: because no page, action, route or tool changed.
commented

Installing the quality set (set:quality) now writes config/EssentialCommands.properties in the same commit as the mods, through the existing withConfig path. The file turns on enable_home, enable_spawn and enable_tpa, turns off 16 other commands and sets use_permissions_api=false, so every player can use the three with no permission plugin. The plan adds a "Writes config/EssentialCommands.properties" line on both the page and the terminal. Nothing is written when Essential Commands is left out or already installed.

Needs a person before merge: the key names are not confirmed. The off names are the issue's minimum list: back, warp, nick, rtp, fly, workbench, enderchest, top, gamemode, afk, invuln, day, night, feed, heal, repair. The builder's sandbox refuses api.modrinth.com and raw.githubusercontent.com, so these and use_permissions_api were not checked against the mod's default EssentialCommands.properties or its source. Essential Commands ignores keys it does not read, so a wrong name leaves that command on without telling anyone. Please compare the names with the mod's default config and correct any that differ before merging. On the first start of a server, /home should work and /back should be refused.

Also in this pull:

  • ModSet.cautions and its "Before players join" line in planSet are removed, since no set uses them any more. The owner-must line for Essential Commands is gone from mod_sets.ts and the docs.
  • In src/games/mod_sets.ts, the EC_* constants and essentialConfig sit above QUALITY's doc comment, with one line saying where the keys come from.
  • docs/features/game-mods.md describes the written config and says that removing Essential Commands later leaves its config in the repository.

test/game-mods.test.ts reads the config written by an install and fails if the file is missing or if any command other than home, spawn and tpa is on. bun x tsc --noEmit and that test file pass.

To try it: on a Fabric server, preview Quality of life (/games/net/<server>?add=set:quality, terminal key q) and look for the "Writes config/EssentialCommands.properties" line.

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs