|
|
|
@ -29,19 +29,12 @@ public enum CharacterTitle {
@@ -29,19 +29,12 @@ public enum CharacterTitle {
|
|
|
|
|
private ByteBuffer footer; |
|
|
|
|
|
|
|
|
|
CharacterTitle(int _r, int _g, int _b, String _prefix) { |
|
|
|
|
char[] str_header; |
|
|
|
|
if(_prefix.length() > 1) { |
|
|
|
|
str_header = ("^\\c" + |
|
|
|
|
(((_r < 100) ? ((_r < 10) ? "00" : "0") : "") + ((byte) _r & 0xFF)) + |
|
|
|
|
(((_g < 100) ? ((_g < 10) ? "00" : "0") : "") + ((byte) _g & 0xFF)) + |
|
|
|
|
(((_b < 100) ? ((_b < 10) ? "00" : "0") : "") + ((byte) _b & 0xFF)) + |
|
|
|
|
'<' + _prefix + "> ").toCharArray(); |
|
|
|
|
} else{ |
|
|
|
|
str_header = ("^\\c" + |
|
|
|
|
(((_r < 100) ? ((_r < 10) ? "00" : "0") : "") + ((byte) _r & 0xFF)) + |
|
|
|
|
(((_g < 100) ? ((_g < 10) ? "00" : "0") : "") + ((byte) _g & 0xFF)) + |
|
|
|
|
(((_b < 100) ? ((_b < 10) ? "00" : "0") : "") + ((byte) _b & 0xFF))).toCharArray(); |
|
|
|
|
} |
|
|
|
|
char[] str_header = ("^\\c" + |
|
|
|
|
(((_r < 100) ? ((_r < 10) ? "00" : "0") : "") + ((byte) _r & 0xFF)) + |
|
|
|
|
(((_g < 100) ? ((_g < 10) ? "00" : "0") : "") + ((byte) _g & 0xFF)) + |
|
|
|
|
(((_b < 100) ? ((_b < 10) ? "00" : "0") : "") + ((byte) _b & 0xFF)) + |
|
|
|
|
_prefix).toCharArray(); |
|
|
|
|
|
|
|
|
|
char[] str_footer = ("^\\c255255255").toCharArray(); |
|
|
|
|
|
|
|
|
|
this.headerLength = str_header.length; |
|
|
|
|