feat: run configured console commands on alert - #1
Open
clawd131662[bot] wants to merge 2 commits into
Open
Conversation
Add an `alert-commands` config key: a list of console commands dispatched
(in order, as the console sender) whenever an alert fires, sharing the same
placeholders as `alert-message` (${Player}, ${Block}, ${onClicked}, ${x},
${y}, ${z}, ${world}). Empty by default, so existing behavior is unchanged.
Placeholder substitution is extracted into a shared `format(...)` helper used
by both the console message and the commands. Held as a List<String> (not a
Set like the other list keys) to preserve execution order and allow dupes.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Adds an
alert-commandsconfig key so the honeypot can react, not just report. Whenever an alert fires, each listed command is dispatched as the console sender, in order.Details
alert-message:${Player},${Block},${onClicked},${x},${y},${z},${world}.format(...)helper used by both the console message and the commands.dispatchCommandas the console sender (no leading/). The listeners are synchronous, so dispatch is on the main thread.List<String>(not aSetlike the other list keys) to preserve execution order and allow duplicates.&) are not translated for commands (only for the console message).Notes
tell-style commands should support&codes.chore: bump version to 1.4-beta.1is included so the beta release jar names correctly.Test plan
./gradlew buildpasses (JDK 21); jar builds asResidenceAlert-1.4-beta.1.jarandplugin.ymlrendersversion: 1.4-beta.1.🤖 Generated with Claude Code