From f183d1ebef1bffd264214885675ceaed6be38f43 Mon Sep 17 00:00:00 2001 From: Marc Baloup Date: Sun, 3 Oct 2021 16:10:18 +0200 Subject: [PATCH] Fix ChatUtil maxWidth was ignored by centerText method --- Core/src/main/java/fr/pandacube/lib/core/chat/ChatUtil.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Core/src/main/java/fr/pandacube/lib/core/chat/ChatUtil.java b/Core/src/main/java/fr/pandacube/lib/core/chat/ChatUtil.java index 31de15e..edbb8c1 100644 --- a/Core/src/main/java/fr/pandacube/lib/core/chat/ChatUtil.java +++ b/Core/src/main/java/fr/pandacube/lib/core/chat/ChatUtil.java @@ -191,7 +191,7 @@ public class ChatUtil { return centerText(text, repeatedChar, decorationColor, console, console ? CONSOLE_NB_CHAR_DEFAULT : DEFAULT_CHAT_WIDTH); } public static Chat centerText(Chat text, char repeatedChar, TextColor decorationColor, boolean console, int maxWidth) { - return centerText(text, repeatedChar, decorationColor, false, console, console ? CONSOLE_NB_CHAR_DEFAULT : DEFAULT_CHAT_WIDTH); + return centerText(text, repeatedChar, decorationColor, false, console, maxWidth); } /** @@ -251,8 +251,7 @@ public class ChatUtil { } - public static Chat rightText(Chat text, char repeatedChar, TextColor decorationColor, int nbRight, - boolean console) { + public static Chat rightText(Chat text, char repeatedChar, TextColor decorationColor, int nbRight, boolean console) { return rightText(text, repeatedChar, decorationColor, nbRight, console, console ? CONSOLE_NB_CHAR_DEFAULT : DEFAULT_CHAT_WIDTH); }