Skip to content

Add a standalone UltiTools 7.0 module example - #13

Merged
wisdommen merged 3 commits into
masterfrom
feature/7.0-author-trial
Nov 27, 2026
Merged

wisdommen merged 3 commits into
masterfrom
feature/7.0-author-trial

Conversation

@wisdommen

@wisdommen wisdommen commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

What changed

  • Add FieldJournal under module-example/, an independent Maven project for an UltiTools 7.0 module. It demonstrates a permission-gated command with argument completion, English and Chinese catalogues, a native note form, and a chest screen for reading the journal.
  • Use a validated configuration entity and a config-bound reminder. Store each player's journal by UUID, and contribute the fieldjournal:trail_mark enchantment during bootstrap.
  • Add module-only CI in .github/workflows/module-example-ci.yml and an eight-row acceptance checklist in module-example/UAT-CHECKLIST.md. The root Maven project is unchanged.

Verification

  • mvn -B -ntp clean verify from module-example/ on JDK 25: 19 tests, 0 failures, 0 errors, 0 skipped. JaCoCo covered 125 of 137 lines (91.24%).
  • actionlint .github/workflows/module-example-ci.yml passed.
  • module-example/target/FieldJournal-1.0.0.jar contains plugin.yml with integer api-version: 700, plus messages/en.yml and messages/zh.yml.

UAT: required — a new example module whose command, messages, dialog, chest screen, scheduled task, config, data and bootstrap content can only be observed on a real Paper 26.3 server

Known limitations

  • No requested feature was omitted. Live registration, player locale selection, screen interactions, reload timing, SQLite persistence across restarts, and enchantment application still need Paper acceptance.
  • Trail Mark demonstrates enchantment registration and application to a diamond shovel; it has no additional gameplay effect.
  • Acceptance: the suggestion check for /fieldjournal record r showed nothing in the first run (first action after rejoining, two-second wait) and passed on the same JAR in a re-run that waited 15 seconds after rejoining. The latency of the first argument-suggestion request after a join was not measured; tracked in Follow-up to #13: minor items on the module example #14.

🤖 Generated with Claude Code

Scaffold FieldJournal and demonstrate commands, localized text, native
and chest screens, reloadable reminders, persistent entries, and an
enchantment contribution. Add module-only CI, tests, and a Paper checklist.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The module example depends on UltiTools-API 7.0.0-SNAPSHOT. The Maven cache
key only hashes module-example/pom.xml, so a restored cache can hold an older
snapshot that Maven does not re-check for a day. Pass -U so every run resolves
the current snapshot.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@wisdommen

Copy link
Copy Markdown
Member Author

Independent review record

  • Reviewed cadd9a715c35d3e57e63d290a2f61637bc433d11 against master at c1317f6a6a9615459edcb434bc6d6629743f206d. Read-only review; each of the eight features was traced against the framework source on main (1953187e).
  • Findings: 0 P1, 1 P2, 11 P3.
  • P2, fixed in 14011a1c5ad6899497ed6018c127a1a124086acc: module-example-ci.yml ran Maven without -U. The cache key only hashes module-example/pom.xml, so a restored cache could hold an older 7.0.0-SNAPSHOT. That one-line change was reviewed separately by a second independent reviewer: no findings (actionlint and git diff --check clean).
  • Read against the source, all eight features are expected to work: command registration, permission and completion; catalogue selection with fallback from zh_CN to zh; the form's confirm/cancel flow on the player's entity context; the chest click callback; the config-bound schedule (key, type and unit match, re-applied on reload); @NotEmpty / @Size validation keeping the running value on a failed reload; the UUID-keyed entity and its table; the bootstrap enchantment declaration.
  • No type marked @ApiStatus.Internal is used. The descriptor keys, api-version: 700, dependency scopes, catalogue location and file names match the code that reads them.
  • module-example/UAT-CHECKLIST.md: every row can be executed and every Expected matches the catalogues and the code verbatim, Chinese punctuation included.
  • Three points only a real server settles, all covered by checklist rows: whether vanilla /enchant applies the module's enchantment and how it is named, the actual interval after a reload, and whether the namespaced alias is hidden from a player without the permission.
  • Disposition: the P3 items (test coverage of the reload path and a few branches, scaffold leftovers, README notes on main-thread storage and the experimental bootstrap API, one checklist precondition) are collected in Follow-up to #13: minor items on the module example #14.

@wisdommen

Copy link
Copy Markdown
Member Author

Real-server acceptance run — 8 of 9 rows pass, 1 fails

Module JAR built from 14011a1c5ad6899497ed6018c127a1a124086acc (16,683 bytes, SHA-256 f08552318d3ed2cb55773989a08bdfe58de2730ed1ee5621bdb119564c69c34e) on Paper 26.3 build 258 with UltiTools-API built from framework main at 1953187e, driven from a vanilla 26.3 client. 9 rows, 38 clauses, two server starts.

Row Result
Command Fail — one clause, see below
Messages (English / Chinese), status, form, chest screen, configuration and reload, reminder, bootstrap content, persistence across restart Pass

The failing clause: a permitted player types /fieldjournal record r and waits two seconds: no suggestion list and no inline river. In the same session the namespaced command name is suggested normally, and /fieldjournal record forest then succeeds. The module declares the provider as @CmdParam(value = "site", suggest = "suggestSites") with List<String> suggestSites(String), a signature the @CmdParam.suggest Javadoc lists as supported.

Not merged. The cause is being investigated on the framework side first; once it is known, only the affected row is re-run.

release_authorized: false

@wisdommen

Copy link
Copy Markdown
Member Author

Real-server acceptance — re-run of the failing row: pass

The "Command" row was re-run on the same bytes (module JAR 16,683 bytes, SHA-256 f08552318d3ed2cb55773989a08bdfe58de2730ed1ee5621bdb119564c69c34e, built from 14011a1c5ad6899497ed6018c127a1a124086acc; same framework build, Paper 26.3 build 258, vanilla 26.3 client). The four required clauses are unchanged.

Clause Result
A player without the permission is not offered fieldjournal Pass
The namespaced name is offered only to a permitted player Pass
/fieldjournal record r offers river Pass — the only suggestion is river
/fieldjournal record forest records the first entry Pass

Additional unscored observations: /fieldjournal lists book, help, note, record, status; /fieldjournal record lists forest, mountain, river.

What differed from the first run. In the first run the suggestion check was the player's first action after rejoining and waited two seconds; in this run the player waited 15 seconds after rejoining and each check waited three seconds. No product byte changed between the runs. Whether the very first suggestion request after a join can take longer than two seconds was not measured; that question is recorded in #14. The first run's verdict stays on record above.

An intermediate attempt produced no observation: its server start was stopped by an unrelated DNS failure while the server fetched the Minecraft services key.

All nine rows now have a pass verdict on this JAR. The head after merging master (b03699aff76319634579c7a2482d4ef417d022df) changes nothing under module-example/, so the tested JAR is unaffected.

release_authorized: false

@wisdommen
wisdommen merged commit 06efa45 into master Nov 27, 2026
4 checks passed
@wisdommen
wisdommen deleted the feature/7.0-author-trial branch November 27, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant