mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-26 04:25:15 +01:00
Now you can specify bold, italic... colors in jobs
- Fix for regeneration potion effect not works Closes #823
This commit is contained in:
parent
6ec44a92cf
commit
ec9507e836
@ -727,7 +727,12 @@ public class ConfigManager {
|
||||
|
||||
ChatColor color = ChatColor.WHITE;
|
||||
if (jobSection.contains("ChatColour")) {
|
||||
color = ChatColor.matchColor(jobSection.getString("ChatColour", ""));
|
||||
String c = jobSection.getString("ChatColour", "");
|
||||
|
||||
color = ChatColor.matchColor(c);
|
||||
if (color == null && !c.isEmpty())
|
||||
color = ChatColor.matchColor(c.charAt(0));
|
||||
|
||||
if (color == null) {
|
||||
color = ChatColor.WHITE;
|
||||
log.warning("Job " + jobKey + " has an invalid ChatColour property. Defaulting to WHITE!");
|
||||
|
@ -33,7 +33,7 @@ public enum Potion {
|
||||
NIGHT_VISION("night_vision"),
|
||||
LONG_NIGHT_VISION("long_night_vision"),
|
||||
POISON("poison"),
|
||||
REGEN("regen"),
|
||||
REGENERATION("regeneration"),
|
||||
SLOW_FALLING("slow_falling"),
|
||||
SLOWNESS("slowness"),
|
||||
SPEED("speed"),
|
||||
|
@ -37,7 +37,12 @@ public enum ChatColor {
|
||||
RED('c', 12),
|
||||
LIGHT_PURPLE('d', 13),
|
||||
YELLOW('e', 14),
|
||||
WHITE('f', 15);
|
||||
WHITE('f', 15),
|
||||
BOLD('l', 16),
|
||||
ITALIC('o', 17),
|
||||
UNDERLINE('n', 18),
|
||||
RESET('r', 19),
|
||||
STRIKETHROUGH('m', 20);
|
||||
|
||||
private static final char COLOR_CHAR = '\u00A7';
|
||||
private final char code;
|
||||
|
Loading…
Reference in New Issue
Block a user