Skip to content

HoverEvent and ClickEvent are not available when changing message from AsyncChatEvent #10980

@Elikill58

Description

@Elikill58

Expected behavior

I want to add hover content when player send message in chat. So, I change the message value from AsyncChatEvent event.

Observed/Actual behavior

The message is well edited, but there is no hover or click event. If I send the message myself, the hover is well sent

Steps/models to reproduce

@EventHandler
public void onChat(AsyncChatEvent e) {
	e.message(Component.text("something").hoverEvent(HoverEvent.showText(Component.text("This is a test"))));
	e.getPlayer().sendMessage(Component.text("something myself").hoverEvent(HoverEvent.showText(Component.text("This is a test myself"))));
}

Plugin and Datapack List

My plugin test

Paper version

This server is running Paper version git-Paper-497 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: d8d54d9 on ver/1.20.4)
You are running the latest version
Previous version: git-Paper-496 (MC: 1.20.4)

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    resolution: awaiting responseAdditional information is required from the issue reportertype: bugSomething doesn't work as it was intended to.version: 1.20.4Game version 1.20.4

    Type

    No fields configured for Bug.

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions