mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-06-11 21:43:54 +00:00
Adds Something that is missing
Adds Futil.strictcolorize (that filters Banned colors on smite and gtfo) Adds Actual Server-TFM features Adds Wipewarps adds wipecoreprotectdata adds spectator adds rainbownick adds rainbowtag
This commit is contained in:
@ -45,8 +45,16 @@ public class FUtil
|
||||
public static final List<ChatColor> CHAT_COLOR_POOL;
|
||||
public static final List<ChatColor> CHAT_RAINBOW;
|
||||
private static Iterator<ChatColor> color;
|
||||
|
||||
static {
|
||||
private static final ChatColor[] BLOCKED = new ChatColor[]
|
||||
{
|
||||
ChatColor.MAGIC,
|
||||
ChatColor.STRIKETHROUGH,
|
||||
ChatColor.ITALIC,
|
||||
ChatColor.UNDERLINE,
|
||||
ChatColor.BLACK
|
||||
};
|
||||
|
||||
static {
|
||||
RANDOM = new Random();
|
||||
DEVELOPERS = Arrays.asList("Madgeek1450", "Prozza", "WickedGamingUK", "aggelosQQ", "OxLemonxO", "Commodore64x", "Wild1145", "marcocorriero");
|
||||
FOUNDER = Arrays.asList("markbyron");
|
||||
@ -64,9 +72,10 @@ public class FUtil
|
||||
}
|
||||
FUtil.color = FUtil.CHAT_RAINBOW.iterator();
|
||||
}
|
||||
|
||||
private static final Pattern REGEX = Pattern.compile(ChatColor.COLOR_CHAR + "[" + StringUtils.join(BLOCKED, "") + "]", Pattern.CASE_INSENSITIVE);
|
||||
|
||||
private FUtil()
|
||||
|
||||
private FUtil()
|
||||
{
|
||||
}
|
||||
|
||||
@ -389,6 +398,22 @@ private FUtil()
|
||||
return ChatColor.translateAlternateColorCodes('&', string);
|
||||
}
|
||||
|
||||
public static String StrictColorize(String string)
|
||||
{
|
||||
String string2 = ChatColor.translateAlternateColorCodes('&', string);
|
||||
final Matcher matcher = REGEX.matcher(string2);
|
||||
if (matcher.find())
|
||||
{
|
||||
final String filteredcolorize = matcher.replaceAll("&");
|
||||
if(matcher.find(REGEX.matcher(ChatColor.BLACK)))
|
||||
return filteredcolorize;
|
||||
}
|
||||
else
|
||||
{
|
||||
return string2;
|
||||
}
|
||||
}
|
||||
|
||||
public static Date getUnixDate(long unix)
|
||||
{
|
||||
return new Date(unix * 1000);
|
||||
|
Reference in New Issue
Block a user