Formatting fixes.

This commit is contained in:
wizjany 2019-05-04 23:21:19 -04:00
parent 82451595cb
commit 18365bbe42
2 changed files with 3 additions and 1 deletions

View File

@ -442,6 +442,7 @@ private void appendStringFlagValue(TextComponent.Builder builder, StringFlag fla
} else {
final TextComponent defComp = LegacyComponentSerializer.INSTANCE.deserialize(defVal);
String display = reduceToText(defComp);
display = display.replace("\n", "\\n");
if (display.length() > 23) {
display = display.substring(0, 20) + "...";
}
@ -451,6 +452,7 @@ private void appendStringFlagValue(TextComponent.Builder builder, StringFlag fla
} else {
TextComponent currComp = LegacyComponentSerializer.INSTANCE.deserialize(currVal);
String display = reduceToText(currComp);
display = display.replace("\n", "\\n");
if (display.length() > 23) {
display = display.substring(0, 20) + "...";
}

View File

@ -41,7 +41,7 @@ public static void sendStringToTitle(LocalPlayer player, String message) {
String title = CommandUtils.replaceColorMacros(parts[0]);
title = WorldGuard.getInstance().getPlatform().getMatcher().replaceMacros(player, title);
if (parts.length > 1) {
String subtitle = CommandUtils.replaceColorMacros(parts[0]);
String subtitle = CommandUtils.replaceColorMacros(parts[1]);
subtitle = WorldGuard.getInstance().getPlatform().getMatcher().replaceMacros(player, subtitle);
player.sendTitle(title, subtitle);
} else {