Class ChatFormatter
- java.lang.Object
-
- com.djrapitops.plan.utilities.chat.ChatFormatter
-
public class ChatFormatter extends java.lang.Object
Formats chat messages in different ways.Original code: https://hastebin.com/uziyajirag.avrasm
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
center(java.lang.String message)
static java.lang.String
columns(int columns, java.lang.String[] lines, java.lang.String separator)
static void
compensate(int toCompensate, int compensated, java.lang.StringBuilder builder, java.lang.String currentStyle)
static java.lang.String
getLastStyle(java.lang.String message)
static int
getPxMessageWidth(java.lang.String message)
static java.lang.String
leftPad(java.lang.String message, int spaces)
-
-
-
Method Detail
-
leftPad
public static java.lang.String leftPad(java.lang.String message, int spaces)
-
columns
public static java.lang.String columns(int columns, java.lang.String[] lines, java.lang.String separator)
-
getLastStyle
public static java.lang.String getLastStyle(java.lang.String message)
-
center
public static java.lang.String center(java.lang.String message)
-
compensate
public static void compensate(int toCompensate, int compensated, java.lang.StringBuilder builder, java.lang.String currentStyle)
-
getPxMessageWidth
public static int getPxMessageWidth(java.lang.String message)
-
-