mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 05:06:45 +01:00
Fixed ^r's ability to continue onto the second line.
This commit is contained in:
parent
a3c039b112
commit
8d8553c568
@ -492,13 +492,16 @@ public class vMinecraftChat {
|
||||
for(String msg: message)
|
||||
{
|
||||
//Start the line with the most recent color
|
||||
String temp = recentColor;
|
||||
String temp = "";
|
||||
if(!recentColor.equals("~") && recentColor != null)
|
||||
temp += recentColor;
|
||||
|
||||
//Loop through looking for a color code
|
||||
for(int x = 0; x< msg.length(); x++)
|
||||
{
|
||||
//If the char is a ^ or <EFBFBD>
|
||||
if(msg.charAt(x) == '^' || msg.charAt(x) == Colors.White.charAt(0))
|
||||
if(taste || msg.charAt(x) == '^'
|
||||
|| msg.charAt(x) == Colors.White.charAt(0))
|
||||
{
|
||||
if(x != msg.length() - 1)
|
||||
{
|
||||
@ -509,7 +512,7 @@ public class vMinecraftChat {
|
||||
recentColor = vMinecraftChat.colorChange(msg.charAt(x+1));
|
||||
|
||||
//If the color specified is rainbow
|
||||
if(recentColor.equals("~") || taste)
|
||||
if(taste || recentColor.equals("~"))
|
||||
{
|
||||
//Skip the quake code for rainbow
|
||||
if(recentColor.equals("~"))
|
||||
@ -533,7 +536,8 @@ public class vMinecraftChat {
|
||||
|
||||
//If it reached another color instead of the end
|
||||
if(x < msg.length() && msg.charAt(x) == '^'
|
||||
|| msg.charAt(x) == Colors.Red.charAt(0) )
|
||||
|| x < msg.length()
|
||||
&& msg.charAt(x) == Colors.Red.charAt(0) )
|
||||
{
|
||||
taste = false;
|
||||
i = 0;
|
||||
|
@ -396,7 +396,8 @@ public class vMinecraftCommands{
|
||||
+ Colors.Rose + "c"
|
||||
+ Colors.LightPurple + "d"
|
||||
+ Colors.Yellow + "e"
|
||||
+ Colors.White + "f");
|
||||
+ Colors.White + "f"
|
||||
+ "^r" + "rrrrrrrrrrr");
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user