Skip to content

Comments

Rework Show Quest Command#144

Open
WaitingIdly wants to merge 1 commit intoCleanroomMC:1.12from
WaitingIdly:view-quest
Open

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

Conversation

@WaitingIdly
Copy link
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
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.

1 participant