Shopkeepers

Shopkeepers

2M Downloads

Items not working after name color change

Spieler2301 opened this issue ยท 3 comments

commented

I expirienced this bug in 1.12.2, and now in 1.14.4. When I customise items (with McStacker 1.14.4) I can give the Items name and discription color-codes as well as setting them bold, italic etc., these work perfectly fine when importet, but if the server gets restarted, a player carying them dies or reconnects, they suddenly get "changed" in a wiered way:

They don't work with newly created items of thier kind in the shopkeeper menu anymore.

p.s. Is this issue fixed in newer MC versions?

commented

Sounds like this issue to me: #578
The 'solution' is to create the items in the same internal format Spigot is using when plugin create these items.
In the latest snapshot version of shopkeepers (https://nexus.lichtspiele.org/repository/snapshots/com/nisovin/shopkeepers/Shopkeepers/2.11.0-SNAPSHOT/Shopkeepers-2.11.0-20200721.234536-1.jar) there is also a command (/shopkeeper convertitem) with which you can convert items into Spigot's format. There is also a pull request over at Spigot which is supposed to fix this, however it is still pending review.

commented

But can I create those items per command?

commented

On Versions below MC 1.16 (such as your 1.14 version) Spigot uses legacy color codes for colored display names and lore. I don't think there is an easy way to use those in commands. It is possible to use unicode escape sequences (see the linked ticket above), but those have some flaws as well.
On MC 1.16 Spigot actually uses the json text format of Minecraft. But the concrete Json format still has to perfectly match (Spigot creates some additional text components).