`/plot info` Usage of MiniMessage by list item (Add preprocessed tags for click actions)
Server Implementation
Paper
Server Version
1.19.4
Describe the bug
I would like to include a suggest-command in the player list of /plot info, but I do not get the expected conversion of the MiniMessage definition. In the suggest-command part, the <user> is not transferred to the username of the list item. The hover works and the <user> name is displaying too, but the suggest-command down't work here.
"info.plot_user_list": "<click:suggest_command:'<user>'><hover:show_text:'<gray>Copy user name'><white><user><gray></hover></click>",
To Reproduce
Changing the info.plot_user_list part of messages_en.json with the new message ->
"info.plot_user_list": "<click:suggest_command:'<user>'><hover:show_text:'<gray>Copy user name'><white><user><gray></hover></click>",
Usage of /plot info -> Owner, Added, Trusted player list
Expected behaviour
Screenshots / Videos
No response
Error log (if applicable)
No response
Plot Debugpaste
XXX
PlotSquared Version
PlotSquared 7.2.0
Checklist
- [X] I have included a Plot debugpaste.
- [X] I am using the newest build from https://www.spigotmc.org/resources/77506/ and the issue still persists.
Anything else?
No response
Relating issue in adventure repository: https://github.com/KyoriPowered/adventure/issues/964
It's due to the fact, that we insert styled components and such tag arguments require plain processed string values. Could be a feature request for supply one tag (e.g. user_raw) as well I guess,
What does work locally is using Tag.preProcessParsed - that will be inserted as expected.
I did not push any changes as I'm not sure if there are any objections due to adding the plain-text-serializer and a new argument (where the naming might be better)
user_raw and uuid_raw.
I would like to have the UUID in the suggest-command later on.
user_rawanduuid_raw.I would like to have the UUID in the suggest-command later on.
You might run into issues later on with that. The
Edit: The user can be the translation for "Everyone" and "Server" as well, where no handling in such cases is clear to me. I mean, they do have internal UUIDs, but I doubt those should be recommend a command?
But info.plot_user_list is for all usernames separately, as he defines the list items. It cannot be "comma separated list of usernames" here.
But
info.plot_user_listis for all usernames separately, as he defines the list items. It cannot be "comma separated list of usernames" here.
Oh yeah, you are right. Sorry, my bad. I guess just adding the two tags should suffice in the beginning - MM does not really provide any kind of conditional tags with ternary operations etc, so we can't really differentiate between player-owned and server/everyone-owned plots.
Edit: The user can be the translation for "Everyone" and "Server" as well, where no handling in such cases is clear to me. I mean, they do have internal UUIDs, but I doubt those should be recommend a command?
Yes, that's right. Everyone (*) is saved as UUID = 00000001-0001-0003-0003-000000000007.
But in this case, a suggest-command of this UUID is acceptable, I think.