[SPIGOT-7483] .setText method puts text into "extra" nbt Created: 19/Sep/23 Updated: 25/Dec/24 Resolved: 19/Sep/23 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Major |
Reporter: | Benjamin Simpson | Assignee: | Unassigned |
Resolution: | Won't Fix | Votes: | 0 |
Labels: | 1.20.1, bug, spigot | ||
Environment: |
Windows OS, Pro |
Attachments: |
![]() |
Version: | 1.20.1-R0.1-SNAPSHOT |
Guidelines Read: | Yes |
Description |
When using the .setText(String text) method for a TextDisplay, it puts the string given into a format that does not change the text of the TextDisplay. The 'text' nbt looks like this after the setText method has been used like textDisplay.setText("This is a test");
text:'{"extra":[{"text":"This is a test"}],"text":""}'
This is not correct, as it should put the text like so: text:'{"text":"This is a test"}' |
Comments |
Comment by md_5 [ 19/Sep/23 ] |
This is how the NBT component string conversions operate. The text displays correctly |