You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently using protectionstones and bluemap. I am using this flag in the BlueBridgeWG: ${flag:ps-name} But it will also show the color/markup.
What can I do to remove these?
The text was updated successfully, but these errors were encountered:
Currently nothing except maybe if Protectionstones has a different flag for the raw flag without formatting.
Since those are legacy color codes with a non standard symbol ('&' instead of '§') I don't think I'll specifically add support for this.
However, if I do ever continue actively working on this plugin, I was planning on adding support for recursive replacements and some utility functions like regex replacements in placeholder values etc. So you might be able to work your way around this in the future and I'll definitely keep this issue in mind when I implement something like that, to make sure situations like this one can be resolved using those features.
For now, if you really need this to work and know your way around Java a bit, you could change the final return statement in line 195 in RegionStringLookup.java to something like this:
//Add this to the existing imports at the top of the fileimportorg.bukkit.ChatColor;
//[...]//Replace line 195 with the following:StringflagValueString = flagValue.toString();
if("ps-name".equals(flagName)){
//Uses Bukkit API to translate from & to § codes and then removes all formattingflagValueString = ChatColor.stripColor(ChatColor.translateAlternateColorCodes('&', flagValueString));
}
returnBlueBridgeUtils.escapeHtml(flagValueString);
Just clone this repo, change the code in that file and recompile using ./gradlew build in the repo's root directory.
That would be a pretty simple fix for your case but as it's very hardcoded and specific, I can't release this as a new version right now.
Hey,
I'm currently using protectionstones and bluemap. I am using this flag in the BlueBridgeWG:
${flag:ps-name}
But it will also show the color/markup.What can I do to remove these?
The text was updated successfully, but these errors were encountered: