diff --git a/Core/src/main/java/fr/pandacube/lib/core/chat/Chat.java b/Core/src/main/java/fr/pandacube/lib/core/chat/Chat.java index f881d51..548b3ed 100644 --- a/Core/src/main/java/fr/pandacube/lib/core/chat/Chat.java +++ b/Core/src/main/java/fr/pandacube/lib/core/chat/Chat.java @@ -218,26 +218,26 @@ public abstract class Chat extends ChatStatic implements HoverEventSource maxWidth) return text; @@ -215,9 +227,13 @@ public class ChatUtil { public static Chat leftText(Chat text, char repeatedChar, TextColor decorationColor, int nbLeft, boolean console) { + return leftText(text, repeatedChar, decorationColor, nbLeft, console, console ? CONSOLE_NB_CHAR_DEFAULT : DEFAULT_CHAT_WIDTH); + } + + public static Chat leftText(Chat text, char repeatedChar, TextColor decorationColor, int nbLeft, + boolean console, int maxWidth) { int textWidth = componentWidth(text.getAdv(), console); - int maxWidth = (console) ? CONSOLE_NB_CHAR_DEFAULT : DEFAULT_CHAT_WIDTH; int repeatedCharWidth = charW(repeatedChar, console, false); int leftWidth = nbLeft * repeatedCharWidth; @@ -238,9 +254,13 @@ public class ChatUtil { 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); + } + + public static Chat rightText(Chat text, char repeatedChar, TextColor decorationColor, int nbRight, + boolean console, int maxWidth) { int textWidth = componentWidth(text.getAdv(), console); - int maxWidth = (console) ? CONSOLE_NB_CHAR_DEFAULT : DEFAULT_CHAT_WIDTH; int repeatedCharWidth = charW(repeatedChar, console, false); int rightWidth = nbRight * repeatedCharWidth;