mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-30 21:17:53 +01:00
Fix color not being displayed after a forward slash
This commit is contained in:
parent
7843f74b4b
commit
f17a518e92
@ -178,7 +178,7 @@ public class ColoredText extends JsonMessage {
|
|||||||
final Character p = i == 0 ? null : message.charAt(i - 1);
|
final Character p = i == 0 ? null : message.charAt(i - 1);
|
||||||
// Current char
|
// Current char
|
||||||
final char c = message.charAt(i);
|
final char c = message.charAt(i);
|
||||||
if ((p == null || (p != '/')) && c == '{' && !inFormat) {
|
if (c == '{' && !inFormat) {
|
||||||
|
|
||||||
formatEnd = formatEnd > 0 ? formatEnd + 1 : formatEnd;
|
formatEnd = formatEnd > 0 ? formatEnd + 1 : formatEnd;
|
||||||
final String rawMessage = message.substring(formatEnd, i);
|
final String rawMessage = message.substring(formatEnd, i);
|
||||||
@ -189,7 +189,7 @@ public class ColoredText extends JsonMessage {
|
|||||||
inFormat = true;
|
inFormat = true;
|
||||||
formatStart = i;
|
formatStart = i;
|
||||||
continue;
|
continue;
|
||||||
} else if ((p == null || (p != '/')) && c == '}' && inFormat) {
|
} else if (c == '}' && inFormat) {
|
||||||
// Represent the custom format between the brackets
|
// Represent the custom format between the brackets
|
||||||
final String formatString = message.substring(formatStart + 1, i);
|
final String formatString = message.substring(formatStart + 1, i);
|
||||||
if (formatString.isEmpty())
|
if (formatString.isEmpty())
|
||||||
|
Loading…
Reference in New Issue
Block a user