Skip to content

feat: allow other plugins to start any helper via PluginMessage - #2756

Open
ajkatz wants to merge 3 commits into
Zoinkwiz:masterfrom
ajkatz:plugin-message-start
Open

feat: allow other plugins to start any helper via PluginMessage#2756
ajkatz wants to merge 3 commits into
Zoinkwiz:masterfrom
ajkatz:plugin-message-start

Conversation

@ajkatz

@ajkatz ajkatz commented Jul 2, 2026

Copy link
Copy Markdown

Quest Helper already participates in the RuneLite PluginMessage ecosystem outbound — it posts to shortestpath (DetailedQuestStep) and notenoughrunes (QuestRequirementsPanel) — but has no inbound receiver, so other plugins can't deep-link into it. This adds the other direction using the same convention:

field value
namespace questhelper
name start
data { "quest": "<helper display name>", "source": "<requesting plugin display name>" } — both required
eventBus.post(new PluginMessage("questhelper", "start",
    Map.of("quest", "Dragon Slayer I", "source", "<My Plugin>")));
eventBus.post(new PluginMessage("questhelper", "start",
    Map.of("quest", "Ardougne Elite Diary", "source", "<My Plugin>")));
eventBus.post(new PluginMessage("questhelper", "start",
    Map.of("quest", "Herb run", "source", "<My Plugin>")));      // generic helper
eventBus.post(new PluginMessage("questhelper", "start",
    Map.of("quest", "Agility", "source", "<My Plugin>")));       // skill helper

The start is announced in the player's chatQuest Helper for Dragon Slayer I started, requested by My Plugin. — so it's always visible which plugin triggered it. Messages without a source are ignored.

Works for every helper type, not just quests: the handler delegates to the existing QuestMenuHandler#startUpQuest(String) — the same generic path the quest list and onChatMessage auto-start use — so quests, miniquests, achievement diaries, skill helpers, generic helpers, and player-made quests all resolve through QuestHelperQuest.getByName, and the Shield of Arrav / RFD special cases are inherited rather than duplicated. The call is wrapped in clientThread.invokeLater since PluginMessage arrives on the poster's thread and the Shield of Arrav branch reads the local player.

Malformed or foreign messages are ignored (namespace/name gate + payload type checks), so nothing changes for anyone who doesn't post the message.

Motivation: I maintain the Goal Planner hub plugin and want "resume in Quest Helper" on quest and diary goals — but this is deliberately generic so any plugin (or future Quest Helper features) can use it. Tested end-to-end: a dev client running both plugins, with Goal Planner posting the message and this handler starting quest and diary helpers.

./gradlew build green.

🤖 Generated with Claude Code

@ajkatz
ajkatz marked this pull request as draft July 2, 2026 07:01
Comment thread src/main/java/com/questhelper/QuestHelperPlugin.java
@ajkatz
ajkatz force-pushed the plugin-message-start branch from e7d8940 to 3d9c49a Compare July 2, 2026 08:04
@ajkatz ajkatz changed the title feat: allow other plugins to start a helper via PluginMessage feat: allow other plugins to start any helper via PluginMessage Jul 2, 2026
@ajkatz
ajkatz force-pushed the plugin-message-start branch from 2807919 to b87ca8d Compare July 2, 2026 08:27
@pajlada
pajlada marked this pull request as ready for review July 2, 2026 08:59
@pajlada
pajlada marked this pull request as draft July 2, 2026 08:59
@pajlada

pajlada commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

The snapshot build failures are fine, they're an issue on our end not yours

@ajkatz

ajkatz commented Jul 2, 2026

Copy link
Copy Markdown
Author

The snapshot build failures are fine, they're an issue on our end not yours

thank you for the quick feedback! I'll wait until those are fixed

@ajkatz
ajkatz marked this pull request as ready for review July 3, 2026 01:53
ajkatz and others added 3 commits July 21, 2026 14:44
Adds an inbound PluginMessage handler (namespace "questhelper", name
"start", data key "quest") so other plugins can deep-link a quest
helper by display name, mirroring the plugin message convention Quest
Helper already uses toward Shortest Path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Review feedback: the data map must carry the requesting plugin's display
name under "source"; the start is announced as a game message so the
player always sees which plugin triggered it. Messages without a source
are ignored.
@ajkatz
ajkatz force-pushed the plugin-message-start branch from b87ca8d to 23c81ad Compare July 21, 2026 21:44
@ajkatz

ajkatz commented Jul 21, 2026

Copy link
Copy Markdown
Author

@pajlada rebased this and looks like it's no longer hitting that build issue now 🥳

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.

PluginMessage hook to start a helper from another plugin?

2 participants