mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-07-01 20:46:41 +00:00
Split gcmd sub cmds out n other stuff
This commit is contained in:
@ -126,6 +126,11 @@ public class FUtil
|
||||
return FUtil.DEVELOPERS.contains(name);
|
||||
}
|
||||
|
||||
public static boolean inDeveloperMode()
|
||||
{
|
||||
return ConfigEntry.DEVELOPER_MODE.getBoolean();
|
||||
}
|
||||
|
||||
public static String formatName(String name)
|
||||
{
|
||||
return WordUtils.capitalizeFully(name.replace("_", " "));
|
||||
@ -133,11 +138,7 @@ public class FUtil
|
||||
|
||||
public static String showS(int count)
|
||||
{
|
||||
if (count == 1)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
return "s";
|
||||
return (count == 1 ? "" : "s");
|
||||
}
|
||||
|
||||
public static List<String> getPlayerList()
|
||||
@ -760,6 +761,16 @@ public class FUtil
|
||||
return Color.fromRGB((int) c1values[0], (int) c1values[1], (int) c1values[2]);
|
||||
}
|
||||
|
||||
public static boolean isValidIPv4(String ip)
|
||||
{
|
||||
if (ip.matches("^([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))$")
|
||||
|| ip.matches("^([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\\.([0-9]|[1-9][0-9]|1([0-9][0-9])|2([0-4][0-9]|5[0-5]))\\.([*])\\.([*])$"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static List<Color> createColorGradient(Color c1, Color c2, int steps)
|
||||
{
|
||||
double factor = 1.0 / (steps - 1.0);
|
||||
|
Reference in New Issue
Block a user