randomized gradients and /playtime

This commit is contained in:
Super_
2020-07-15 00:23:26 -04:00
parent 067180d2cf
commit 114567a302
6 changed files with 128 additions and 6 deletions

View File

@ -779,6 +779,21 @@ public class FUtil
return new java.awt.Color(color.getRed(), color.getGreen(), color.getBlue());
}
public static java.awt.Color getRandomAWTColor()
{
return new java.awt.Color(randomInteger(0, 255), randomInteger(0, 255), randomInteger(0, 255));
}
public static String getHexStringOfAWTColor(java.awt.Color color)
{
String hex = Integer.toHexString(color.getRGB() & 0xFFFFFF);
if (hex.length() < 6)
{
hex = "0" + hex;
}
return "#" + hex;
}
public static void createExplosionOnDelay(Location location, float power, int delay)
{
new BukkitRunnable()