Fixed Markdown condition and added JAR

This commit is contained in:
Norbi Peti 2016-05-07 14:28:05 +02:00
parent 4dc588fcf7
commit 9e75f54865
2 changed files with 12 additions and 7 deletions

Binary file not shown.

View file

@ -100,22 +100,27 @@ public class ChatProcessing {
while (cont) {
int first_under = formattedmessage.indexOf("_");
if (first_under != -1 && formattedmessage.indexOf("_", first_under) != -1) // underline
if (first_under != -1
&& formattedmessage.indexOf("_", first_under + 1) != -1) // underline
{
formattedmessage = formattedmessage.replaceFirst("_", "§n").replaceFirst("_", "§r");
formattedmessage = formattedmessage.replaceFirst("_", "§n")
.replaceFirst("_", "§r");
continue;
}
int first_bold = formattedmessage.indexOf("**");
if (first_bold != -1 && formattedmessage.indexOf("**", first_bold) != -1) // bold
if (first_bold != -1
&& formattedmessage.indexOf("**", first_bold + 1) != -1) // bold
{
formattedmessage = formattedmessage.replaceFirst("\\*\\*", "§l").replaceFirst("\\*\\*", "§r");
formattedmessage = formattedmessage
.replaceFirst("\\*\\*", "§l").replaceFirst("\\*\\*",
"§r");
continue;
}
int first = formattedmessage.indexOf('*');
if (first != -1 && formattedmessage.indexOf('*', first) != -1) {
formattedmessage = formattedmessage.replaceFirst("\\*", "§o").replaceFirst("\\*", "§r");
if (first != -1 && formattedmessage.indexOf('*', first + 1) != -1) {
formattedmessage = formattedmessage.replaceFirst("\\*", "§o")
.replaceFirst("\\*", "§r");
continue;
}
cont = false;