Add a method to get the color message from a string in the util.
This commit is contained in:
parent
7d0f96cfba
commit
3159d30aff
@ -35,4 +35,9 @@ public class Util {
|
|||||||
|
|
||||||
return (point1 <= loc) && (loc <= point2);
|
return (point1 <= loc) && (loc <= point2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Returns a colorful message from the color codes. */
|
||||||
|
public static String getColorfulMessage(String message) {
|
||||||
|
return message.replaceAll("(?i)&([0-9abcdefklmnor])", "\u00A7$1");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user