Repository navigation
Add command-and-message actions - #278
Closed
kazotaruumc72 wants to merge 2 commits into
Closed
kazotaruumc72 wants to merge 2 commits into
kazotaruumc72 wants to merge 2 commits into
Conversation
Add console-command-and-message and player-command-and-message, which run commands then send messages to the player, and their random variants that pick one section at random. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add a random-console-command-and-message example to basic_inventory.yml, fixtures for the new actions in the serialization test, and read numeric section keys (1, 2, 3) without a ClassCastException. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Repository owner
locked and limited conversation to collaborators
Nov 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
New actions that run commands and send messages to the player in one action.
console-command-and-message: runscommandsas the console, then sendsmessagesto the player. Options:stop-on-failure,minimessage.player-command-and-message: makes the player runcommands, then sendsmessages. Options:command-in-chat,minimessage.random-console-command-and-message/random-player-command-and-message: each section of the action (1,2, ...) holdscommandsandmessages. One section is picked at random (equal chance) each time the action runs. The options can be set per section or once on the action for every section. Sections withoutcommandsormessagesare ignored, and an action with no valid section logs a warning on load.The actions reuse
ConsoleCommandAction,PlayerCommandActionandMessageActioninstead of duplicating their logic. They are registered through@AutoActionLoaderand support serialization.Notes:
stop-on-failureonly stops the remaining commands. The messages are still sent.Test plan
./gradlew :compileJavaActionSerializationTest(fixtures added for the 4 new actions: load, serialize, reload)basic_inventory.yml(myFourthButton)🤖 Generated with Claude Code