GeorgH93 / Minepacks

Free and reliable backpack plugin for Bukkit/Spigot/Paper
https://www.spigotmc.org/resources/19286/
GNU General Public License v3.0
166 stars 75 forks source link

Bold not resetting after another chatcolor or chatformat on lang file #243

Closed Achent007 closed 5 months ago

Achent007 commented 1 year ago

Information

Environment information Plugin + server version info:

Minepacks: 2.4.11-release
Server: git-Paper-1620 (MC: 1.12.2)
Java: 11.0.17

Online mode: yes BungeeCord: yes

Details

Description
When we put some bold on the lang file, the bold is not remove when we use another chatcolor after it.

Steps to reproduce
Edit the lang file and place a chatcolor with bold and put another chatcolor after with some text and those text will be with the bold

Expected behavior
The bold chatformat should be removed after any chatcolor or chatformat use.

ex: image

GeorgH93 commented 1 year ago

What did you put into the language file? Did you use legacy formatting or JSON? When using the old (non JSON) way of formatting, format codes should NOT be be removed by changing color or adding another format code, you have to explicitly remove them by using the reset code (&r or §r). IRC this should be the same behavior as Bukkits chat/message API.

Achent007 commented 1 year ago

actually, before testing something with &r i have this : NoPermission: "&8[&e&l!&8] &cYou don't have the permission." and now : NoPermission: "&8[&e&l!&r&8] &cYou don't have the permission."

GeorgH93 commented 1 year ago

And your current version is not working for you? Because this should translate to ["",{"text":"[","color":"dark_gray"},{"text":"!","color":"yellow","bold":true},{"text":"] ","color":"dark_gray"},{"text":"You don't have the permission.","color":"red"}] which would be correct. Which you should be able to verify by using /tellraw <username> ["",{"text":"[","color":"dark_gray"},{"text":"!","color":"yellow","bold":true},{"text":"] ","color":"dark_gray"},{"text":"You don't have the permission.","color":"red"}].

Are you using some plugin that allows other versions to join your 1.12 server? If so which and which version is your client?

Achent007 commented 1 year ago

I'm using a 1.12.2 client and yes we have viaversion for higher version. My version of en.yml is working but if i want to cancel the bold the &r is recquiered before another chatcolor. If i use chatcolor directly on the chat i don't need this &r per exemple so this is confusing.

GeorgH93 commented 1 year ago

Ah, damn, I see, I mixed up with the difference between bedrock and java edition. I will fix it.