-
Notifications
You must be signed in to change notification settings - Fork 260
Description
Confirmation
- My issue isn't already found on the Issue tracker.
- My issue is about PlaceholderAPI and not any expansion or external plugin
- The issue isn't already fixed in a Spigot Release or Development Build.
- The Common Issues page doesn't mention this issue.
Type
Plugin Bug
What happens?
Currently the /papi bcparse/parse command has different behavior for different senders and types.
PlaceholderAPI/src/main/java/me/clip/placeholderapi/commands/impl/local/CommandParse.java
Lines 125 to 131 in 46d9a69
| if (broadcast) { | |
| Msg.broadcast(message); | |
| } else { | |
| if (!(sender instanceof Player)) { | |
| Msg.msg(sender, message); | |
| } else { | |
| ((Player) sender).spigot().sendMessage(TextComponent.fromLegacyText(message)); |
So currently, if the action is broadcast or the sender is console (ConsoleSender), the message is passed thru Msg#color before being sent but if the sender is player and the action is not broadcast, the message is being passed to the net.md_5.bungee.api.chat.TextComponent#fromLegacyText method which doesn't actually translate the ampersand color codes &c.
Expected Behaviour
Either don't translate color codes at all, or translate them everywhere. I personally do think they shouldn't be translated at all and should be just sent as the expansion gave it. This, in my opinion gives people a better understanding of what the actual expansion returns and won't be surprised when they use it somewhere else and it won't actually look the same.
How to Reproduce
explained above.
/papi dump Output
not needed
Console Log
No response
Errors
No response
Additional Info
No response