adventure icon indicating copy to clipboard operation
adventure copied to clipboard

Text replacement doesn't support hover events

Open TheSirCororo opened this issue 3 years ago • 1 comments

I want to replace some text to component that open url and on hover show text this is my code: (kotlin)

newMessage = newMessage.replaceText {
            it.match(config.blockLinkRegex).replacement(
                Component.text("Test msg").clickEvent (ClickEvent.openUrl("https://google.ru/"))
                    .hoverEvent(
                        HoverEvent.showText(
                            Component.text("cool")
                        )
                    )
            )
}

When I send this message, it not clickable or hoverable, after replace only content and style are saved

TheSirCororo avatar Aug 31 '21 16:08 TheSirCororo

Click event replacing is a duplicate of #236.

kezz avatar Aug 31 '21 16:08 kezz

This issue doesn't have enough information to reproduce -- and it does appear that text replacement should handle hover events as it stands. Feel free to provide a standalone reproducer (not depending on other parts of the plugin or unknown inputs) if this issue still applies.

zml2008 avatar Jan 13 '23 03:01 zml2008