code_language.skript:
import:
org.bukkit.Bukkit
java.util.regex.Pattern
function getshortprefix(prefix: text) :: text:
{_pattern} = Pattern.compile("&[0-9a-fA-Fk-or]")
{_matcher} = {_pattern}.matcher({_prefix})
loop {_matcher}.find(): #Skript says, this is a single value, so it cant loop
{_lastcolorcode} = {_matcher}.group()
return {_lastcolorcode}
Posted by: Sussy Man from the skUnity Discord. View the thread on skUnity Discord here