public class TacoChatUtils
extends java.lang.Object
&a GREEN
&b AQUA
&c RED
&d LIGHT_PURPLE
&e YELLOW
&f WHITE
&0 BLACK
&1 DARK_BLUE
&2 DARK_GREEN
&3 DARK_AQUA
&4 DARK_RED
&5 DARK_PURPLE
&6 GOLD
&7 GRAY
&8 DARK_GRAY
&9 BLUE
&k MAGIC
&l BOLD
&m STRIKETHROUGH
&n UNDERLINE
&o ITALICS
&r RESET
| Constructor and Description |
|---|
TacoChatUtils() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
formatMessage(java.lang.String message)
Uses format codes (preceding by
&) to format the given message. |
boolean |
isNum(java.lang.String s)
Tests whether a String is an int.
|
java.lang.String[] |
removeArgs(java.lang.String[] array,
int startIndex)
Removes the specified indices from a String array (everything before
startIndex is kept). |
java.lang.String |
removeColorCodes(java.lang.String s)
Opposite effect if one where to use
formatMessage(). |
java.lang.String[] |
removeFirstArg(java.lang.String[] array)
Removes the first index in a String array.
|
public java.lang.String formatMessage(java.lang.String message)
&) to format the given message.message - - The message to formatpublic java.lang.String removeColorCodes(java.lang.String s)
formatMessage(). Instead of replacing the color code with a ChatColor object,
it removes the color codes as if by:
if(s.contains(colorcode))
s = s.replaceAll(colorcode, "");
s - - The String which to remove the color codes frompublic boolean isNum(java.lang.String s)
s - public java.lang.String[] removeArgs(java.lang.String[] array,
int startIndex)
startIndex is kept).array - - Array in which the specified indices before startIndex is removedstartIndex - - Any index before this is removedpublic java.lang.String[] removeFirstArg(java.lang.String[] array)
array - - The array in which the first index is removed