
support §#RRGGBB in the uncoloured expression
Closed this issue · 17 comments
Skript/Server Version
paper verson 1.21.4-232-ver/1.21.4@12d8fe0 (?) paper-1.21.4-232
skript version Skript-2.12.1
Bug Description
Using "set {var} to uncolored {var}" or "set {var} to unformatted {var}" does not remove formatting.
Expected Behavior
for it to remove formatting from a string or text variable
Steps to Reproduce
set a variable to a string formatted with &# hex codes, remove "&" with "§" and then make skript unformat the variable, what you get in game is a still colored, string
Errors or Screenshots
no errors in console, the screenshot would only show the input variable being formatted like &#E8E8E8TEST and changed to §#E8E8E8TEST, then outputting the still colored "TEST".
Other
No response
Agreement
- I have read the guidelines above and affirm I am following them with this report.
So unless I'm miss reading you're telling us you're using &#RRGGBB
but skripts's hex format follows <#RRGGBB>
for hex colors, so skript doesn't work with your provided format
So unless I'm miss reading you're telling us you're using
&#RRGGBB
but skripts's hex format follows<#RRGGBB>
for hex colors, so skript doesn't work with your provided format
so how do i remove the formatting, because no plugin uses <#RRGGBB> apart from ones that dont have normal player interactions, im attempting to check set nicknames
You will need to provide a snippet of code that can reproduce this, since I can't figure out what your instructions mean and can't reproduce. It does sound to me like you're trying to uncolour text that isn't actually colored in skript, and then giving it to a separate plugin that colours it via a method skript doesn't support.
command /format <string>:
trigger:
set {_temp} to uncolored arg-1
replace "&" in {_temp} with "§"
send {_temp}
/format &#FF0000TESTING , outputs a colored string still, at least for me
what im trying to do is execute on command "/nick" and then attempting to unformat it and check for any blacklisted words
Hmm, I think this one's up for debate. §#RRGGBB
is not a format skript officially supports, but is a legacy format supported by paper/spigot, so i believe it's intentional that Skript does not handle it. However, since it does clearly work with the send
effect we may want to handle it regardless.
really hope it gets added then, because nearly every text formatting plugin i know of, uses &#RRGGBB, and i cant do anything with that in skript otherwise
really hope it gets added then, because nearly every text formatting plugin i know of, uses &#RRGGBB, and i cant do anything with that in skript otherwise
You can just replace it with <#RRGGBB> with some replace effects, or even more simply with skript-reflect and a replaceAll() call. There's multiple snippets for it on skUnity's snippets page and discord.
how would i specify replacing &#RRGGBB if the RRGGBB all can be different letters/numbers, would i use some kind of thing that checks if it isnt a space?
i dont know how i would do that. there is no one phrase used in the color formatting
how would i specify replacing &#RRGGBB if the RRGGBB all can be different letters/numbers, would i use some kind of thing that checks if it isnt a space?
i dont know how i would do that. there is no one phrase used in the color formatting
I suggest looking at the snippets i mentioned/asking for help in skUnity (or skriptlang's discord). This github isn't really for assistance outside of bug reports/suggestions.
Hmm, I think this one's up for debate.
§#RRGGBB
is not a format skript officially supports, but is a legacy format supported by paper/spigot, so i believe it's intentional that Skript does not handle it. However, since it does clearly work with thesend
effect we may want to handle it regardless.
I don't think there's much of a debate for this, while it's true people call it "legacy" it's not something most plugins actively support especially anymore unless other users explicitly request/overuse it nor do I believe skript even works with it anywhere, as the only way for it to would be if it's modified before getting to skript.
Using the exact code provided above does exactly what I'd expect. (2.11.2 since I don't trust 2.12 rn)
In terms of "being legacy format supported by paper/spigot" they've never supported this format as far as I'm aware since Bukkit forced the formatting of §x§r§r§g§g§b§b
.
For the most part it's only essentials that actively uses it and while plugins like LuckPerms or TAB may support it I feel like that's mostly caused by many users still using Essentials.
For the most part the <#RRGGBB>
format has been made mainstream from most plugins with adventure chat mini message being a decent reason for it, and with the changes to move towards more component based systems *using minimessage I believe adding this is just an extra steps that isn't needed.
how would i specify replacing &#RRGGBB if the RRGGBB all can be different letters/numbers, would i use some kind of thing that checks if it isnt a space?
i dont know how i would do that. there is no one phrase used in the color formattingI suggest looking at the snippets i mentioned/asking for help in skUnity (or skriptlang's discord). This github isn't really for assistance outside of bug reports/suggestions.
i asked for help in the skUnity discord, sadly no help there, except a link to something that wouldnt solve my problem,
ill try making an issue on the skunity website, i saw a post though, and no one helped the person who made the post,
Ah it appears to only colour things in console, not chat. Yes, this isn't something we'll support, then.
Using the exact code provided above does exactly what I'd expect.
Hmm, I think this one's up for debate.
§#RRGGBB
is not a format skript officially supports, but is a legacy format supported by paper/spigot, so i believe it's intentional that Skript does not handle it. However, since it does clearly work with thesend
effect we may want to handle it regardless.I don't think there's much of a debate for this, while it's true people call it "legacy" it's not something most plugins actively support especially anymore unless other users explicitly request/overuse it nor do I believe skript even works with it anywhere, as the only way for it to would be if it's modified before getting to skript.
Using the exact code provided above does exactly what I'd expect. (2.11.2 since I don't trust 2.12 rn)
In terms of "being legacy format supported by paper/spigot" they've never supported this format as far as I'm aware since Bukkit forced the formatting of
§x§r§r§g§g§b§b
.For the most part it's only essentials that actively uses it and while plugins like LuckPerms or TAB may support it I feel like that's mostly caused by many users still using Essentials.
For the most part the
<#RRGGBB>
format has been made mainstream from most plugins with adventure chat mini message being a decent reason for it, and with the changes to move towards more component based systems *using minimessage I believe adding this is just an extra steps that isn't needed.
well then i'd have to figure out how to convert it from &#RRGGBB to <#RRGGBB>, since /nick doesnt use <#RRGGBB>
i just havent ever had to use <#RRGGBB> formatting EVER, nor have i come across it
so this is the first im hearing about it, and needing to have it involved in something im doing
it just sounds like no plugin/server software can agree on what format to use, but having users type §x§r§r§g§g§b§b would be too much, and having users type <#RRGGBB> would also be more of a hassle than just using whats already existing in any of the plugins i have that use text formatting, the format &#RRGGBB