mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Sigh..
This commit is contained in:
parent
af1f52baaf
commit
1fd278a3c9
19
vChat.java
19
vChat.java
@ -92,7 +92,6 @@ public class vChat {
|
|||||||
+ " has you on their ignore list.");
|
+ " has you on their ignore list.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] message = applyColors(wordWrap(msg));
|
String[] message = applyColors(wordWrap(msg));
|
||||||
for(String out : message)
|
for(String out : message)
|
||||||
receiver.sendMessage(out);
|
receiver.sendMessage(out);
|
||||||
@ -172,12 +171,12 @@ public class vChat {
|
|||||||
//and their following color codes
|
//and their following color codes
|
||||||
for(int x = 0; x<str.length(); x++)
|
for(int x = 0; x<str.length(); x++)
|
||||||
{
|
{
|
||||||
if(str.charAt(x) == '^' || str.charAt(x) == Colors.White.charAt(0))
|
if((x+1 <= str.length()) && (str.charAt(x) == '^' || str.charAt(x) == Colors.White.charAt(0)))
|
||||||
{
|
{
|
||||||
if(colorChange(str.charAt(x + 1)) != null)
|
if(colorChange(str.charAt(x + 1)) != null)
|
||||||
{
|
{
|
||||||
x++;
|
x++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int len = charLength(str.charAt(x));
|
int len = charLength(str.charAt(x));
|
||||||
@ -321,7 +320,7 @@ public class vChat {
|
|||||||
//=====================================================================
|
//=====================================================================
|
||||||
public static String colorChange(char colour)
|
public static String colorChange(char colour)
|
||||||
{
|
{
|
||||||
String color = "";
|
String color;
|
||||||
switch(colour)
|
switch(colour)
|
||||||
{
|
{
|
||||||
case '0':
|
case '0':
|
||||||
@ -344,7 +343,7 @@ public class vChat {
|
|||||||
break;
|
break;
|
||||||
case '6':
|
case '6':
|
||||||
color = Colors.Gold;
|
color = Colors.Gold;
|
||||||
break;
|
break;
|
||||||
case '7':
|
case '7':
|
||||||
color = Colors.LightGray;
|
color = Colors.LightGray;
|
||||||
break;
|
break;
|
||||||
@ -402,11 +401,11 @@ public class vChat {
|
|||||||
case 'X':
|
case 'X':
|
||||||
color = "^x";
|
color = "^x";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
color = null;
|
color = null;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=====================================================================
|
//=====================================================================
|
||||||
|
Loading…
Reference in New Issue
Block a user