A few little fixes.

Make /cake give the cake achievement.
Fix /lockup.
Colorful MOTD, more MOTD options.
This commit is contained in:
Steven Lawson
2013-07-04 12:10:08 -04:00
parent 15fbd0e1f3
commit 0dca359e4c
6 changed files with 47 additions and 21 deletions

View File

@ -1035,4 +1035,23 @@ public class TFM_Util
while (checkClass.getSuperclass() != Object.class && ((checkClass = checkClass.getSuperclass()) != null));
return null;
}
public static final List<ChatColor> COLOR_POOL = Arrays.asList(
ChatColor.DARK_BLUE,
ChatColor.DARK_GREEN,
ChatColor.DARK_AQUA,
ChatColor.DARK_RED,
ChatColor.DARK_PURPLE,
ChatColor.GOLD,
ChatColor.BLUE,
ChatColor.GREEN,
ChatColor.AQUA,
ChatColor.RED,
ChatColor.LIGHT_PURPLE,
ChatColor.YELLOW);
private static final Random RANDOM = new Random();
public static ChatColor randomChatColor()
{
return COLOR_POOL.get(RANDOM.nextInt(COLOR_POOL.size()));
}
}