PikaMug / Quests

Easy-to-use, open-source plugin for the creation and execution of quests on Minecraft servers.
https://modrinth.com/plugin/quests.classic
MIT License
152 stars 108 forks source link

NPC names not colour-formatted with "&" in objective completion messages #1714

Closed TheosisOfficial closed 3 years ago

TheosisOfficial commented 3 years ago

What is your Quests version / build number (do not say "latest")? 4.0.4 Describe the problem and how to replicate it. Any console errors to post using a pastebin? If an NPC has a coloured name, Quests does not format it 100% of the time. The only case I've come across is inside objective completion messages. An example is shown in this screenshot: 1 If applicable, can you provide an example quest from quests.yml using a pastebin? N/A

PikaMug commented 3 years ago

Quests does not format NPC names; that task falls on Citizens. However, my testing shows that Citizens automatically converts &e to §e when creating a NPC in-game. Make sure your saves.yml file is in UTF-8 encoding and manually correct any such instances. Starting a string with & can have unexpected consequences as it is considered an anchor symbol in YAML files.

TheosisOfficial commented 3 years ago

Quests does not format NPC names; that task falls on Citizens. However, my testing shows that Citizens automatically converts &e to §e when creating a NPC in-game. Make sure your saves.yml file is in UTF-8 encoding and manually correct any such instances. Starting a string with & can have unexpected consequences as it is considered an anchor symbol in YAML files.

I get what you're saying. However, my issue is that I manually go into saves.yml and change the "§" symbol to "&".

The reason I do this is because on my server, I have a scoreboard feature enabled that shows players' health above their heads as you can see in this screenshot: image When creating an NPC, they also have this, and I don't want it to be the case: image As well as this, if the NPC name matches that of an actual Minecraft account, if they have a cape, the cape will show, and I don't want that to be the case either.

I have no idea why, but I've figured out that using the "&" symbol instead of "§" in their names fixes both of these issues. Hence why I use it. I understand that it is a bit of a duct tape solution, but I can't think of anything else.

PikaMug commented 3 years ago

However, my issue is that I manually go into saves.yml and change the "§" symbol to "&".

That is likely not supported by Citizens. Seek help from its developers at https://github.com/CitizensDev/Citizens2