Closed clienthax closed 11 months ago
Not sure what happened, but this:
@Setting
public TextTemplate NAME = TextTemplate.of(
TextColors.AQUA, "Name: ", TextColors.GREEN, TextTemplate.arg("name")
);
produced this:
NAME {
arguments {
name {
optional=false
}
}
closeArg="}"
content {
color=yellow
extra=[
{
text="Name: "
},
{
text="{name}"
}
]
text=""
}
openArg="{"
options {
closeArg="}"
openArg="{"
}
}
(aqua text being saved as yellow)
Apparently, it only gets saved wrong if there are more than 1 color in the TextTemplate.
EDIT: Looks like this isn't like Text.of(), which builds the text with the args. TextTemplates only have ONE color, more colors should be added as new Text objects, like TextTemplate.of(TextColors.RED, "Hello ", Text.of(TextColors.AQUA, "world"));
. Will open a issue on API.
May be related to #1152
Hey! You seem to be running an unsupported version (API 7) of SpongeAPI. Support for API 7 ended in January 2022.
API-7 is now end-of-life. We will not be issuing any more API updates for version 7 of our API^1
As part of our legacy cleanup we are closing issues relating to API7/1.12.2^2
The Text API is now supplied by the Kyori Adventure library so this issue is no longer relevant to this repository.
I am currently running
Issue Description
Saving TextTemplates to config seems to make them lose data or write the text completly wrong.
produces this in config Seems most of the color references are missing etc..