Skip to content

Messages: Changed Commandant's texts to Semantica messages sent through Keystone 2 - #19

Open
whereareiam wants to merge 3 commits into
feature/cooldownsfrom
feature/keystone-2
Open

whereareiam wants to merge 3 commits into
feature/cooldownsfrom
feature/keystone-2

Conversation

@whereareiam

Copy link
Copy Markdown
Owner

Summary

Stacked on #14 (cooldowns), which I rebased onto dev after the help rewrite merged; GitHub moves the base to dev once #14 merges.

Commandant 2.0.0 on Keystone 2 and Semantica:

  • Texts are Semantica messages. CommandantMessages is a @Messages interface with English defaults in the jar (commandant.exception.*, help.*, pagination.*), exported to translations/en by Semantica's Gradle plugin. A plugin adds them as a layer: ClasspathSource.of(CommandantMessages.class, ...).
  • Sent through the plugin's Keystone messenger. ExceptionHandlerRegistrar.register(manager, messenger) replaces cloud-minecraft-extras with Cloud's exception controller; CommandCooldowns.register(manager, messenger) asks the messenger for a sender's id; help passes each argument as its own message and the page arrows as linked values that run the page command.
  • AnnotatedCommands. Cloud's AnnotationParser registers what it parses, so a plugin had to write its own parser (Identica's IdenticaAnnotationParser) to apply a definition first. AnnotatedCommands.of(manager, senderType).parse(...) reads the commands with a manager that keeps nothing and shares the plugin manager's parsers, puts @Definition (on the method, else on the class) into the command's meta as CommandantKeys.DEFINITION_ID, and returns them unregistered for Commandant.process(...).withDefinition(...).register().
  • Removed: Actor, Console, the serializer engine, the message keys and models, CommandantSyntaxFormatter. Java 21.

Keystone comes from 2.0.0-local-e0ccf8d (whereareiam/keystone feature/platform-neoforge) and Semantica from dev-composed (whereareiam/semantica feature/composed-values) in Maven local; switch the catalog to releases once both are cut. The Milestones mod (NeoForge) builds against 2.0.0-local-160f88d of this branch, and its server test passes with it.

Release notes

  • The title follows Area: Description with a listed area
  • The title describes the effect in the past tense
  • Exactly one label: change
  • major added: plugins must change their code on upgrade
  • Upgrade steps added to .github/release-notes.md (section "Upgrading"; AnnotatedCommands is new and needs none)

Checks

  • Tests added or updated (AnnotatedCommandsTest, the messages and handlers on Keystone 2)
  • Javadocs updated for changed public API

🤖 Generated with Claude Code

whereareiam and others added 3 commits November 17, 2026 19:28
Commandant's texts are the @Messages interface CommandantMessages with English
defaults in its jar (commandant.exception.*, help.*, pagination.*), exported to
translations/en by Semantica's Gradle plugin. Exceptions, cooldowns, help and
pagination send them through the plugin's Keystone messenger: Cloud's exception
controller replaces cloud-minecraft-extras, cooldowns ask the messenger for a
sender's id, and help passes each argument as its own message and the page
arrows as linked values that run the page command. Actor, Console, the
serializer engine, the message keys and models and CommandantSyntaxFormatter
are removed. Java 21.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s long as the mod

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…finition, unregistered

Cloud's AnnotationParser registers what it parses, so a plugin had to write its own
parser (Identica's IdenticaAnnotationParser) to apply a definition before registering.
AnnotatedCommands owns that once: it parses with a manager that keeps nothing and shares
the plugin manager's parsers, and puts @Definition (method, else class) into the meta.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@whereareiam whereareiam added change Changed behavior, configuration or API major Users or developers must act on upgrade labels Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change Changed behavior, configuration or API major Users or developers must act on upgrade

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant