I've been wanting to create text that is able to be hovered over to display a message in a gui, Specifically the name of the item being held by the player (much like how you can do that in chat with /tellraw or in death messages like "Player was slain by OtherPlayer using [Itemnamehere]" )
For example, In a Gui this text shows:
"Hover to reveal item"
when hovered over it would reveal the name of the item currently being held (like Diamond Sword)
How would i accomplish this? I looked into the GuiChat methods however i'm not entirely sure which methods to change (or what to change them to) so that they can work in a Gui properly.
Pleas note that i do not want to use any API's for this (Forge, LiteLoader, etc)
EDIT:I have figured out a way to do this, if you had a similar problem please pm me and i may be able to help