Skip to content

Rework Show Quest Command#144

Merged
WaitingIdly merged 1 commit intoCleanroomMC:1.12from
WaitingIdly:view-quest
Mar 21, 2026
Merged

Rework Show Quest Command#144
WaitingIdly merged 1 commit intoCleanroomMC:1.12from
WaitingIdly:view-quest

Conversation

@WaitingIdly
Copy link
Copy Markdown
Collaborator

changes in this PR:

  • rework how QuestCommandShow works to use ClientChatEvent.
  • make /bq_client show {quest} send a message in chat sharing the quest.

reasoning:
when a player receives a ClientChatReceivedEvent with the relevant message, QuestCommandShow.sentViaClick = true is set to true. then, when the message is clicked, custom logic is fired and sentViaClick is set to false. due to this, the first click on a shared quest works properly, but the second doesnt - you only receive the message once. additionally, this means that if you share -> manually run /bq_client show {quest} the command will have no effect.

another solution might be to override and create a custom ClickEvent, so when getAction is read it is set to be true:

new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/bq_client show " + questId) {
    @Override
    public Action getAction() {
        QuestCommandShow.sentViaClick = true;
        return super.getAction();
    }
}

@WaitingIdly WaitingIdly added the bugfix Fixes problems label Feb 17, 2026
Copy link
Copy Markdown

@jchung01 jchung01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@WaitingIdly WaitingIdly merged commit 1ea7a98 into CleanroomMC:1.12 Mar 21, 2026
2 checks passed
@WaitingIdly WaitingIdly deleted the view-quest branch March 21, 2026 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fixes problems

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants