Open Thorinwasher opened 9 months ago
Same issue on 1.19.4 1.9.2-SNAPSHOT
Same. Let me know if a fix is found.
I would assume this is because you are calling .text("")
, the empty string means default name, i.e. "Barrier" or "Green Wool", if I remember correctly. Calling .text("")
overrides the display name of the item, see:
https://github.com/WesJD/AnvilGUI/blob/master/README.md#textstring
So anyways, if you just remove the .text("")
call then your custom name should probably work. But I'm not sure if that's what you want. The initial contents of the text field are linked to the name of the left item, and the name of the output item is linked to whatever you type into the text field. I haven't really looked into it but wouldn't be surprised if that's hardcoded behavior in the Minecraft client. I mean, that's how anvils work.
You might be able to work around this by using item lore to add your custom text though.
Issue
I'm having problems with setting the displayname of the items. I want one of the displaynames to be "Cancel" in red, and another be "Accept" in green.
Behavior
When triggering the GUI, these items appear to have the default names. (Barrier and Green wool)
Versions
Server:
AnvilGUI version 1.9.2-SNAPSHOT
Reproducible example