Package me.deecaad.core.utils
Class TableBuilder
java.lang.Object
me.deecaad.core.utils.TableBuilder
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordImmutable class that defines the limits of a table (the maximum number of rows that can fit in chat, the requested number of columns, and the maximum number of pixels that can fit in 1 row). -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TableBuilder.TableConstraintsstatic final org.bukkit.map.MapFont -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.kyori.adventure.text.TextComponentbuild()net.kyori.adventure.text.TextComponentnet.kyori.adventure.text.TextComponentWhen you use this method, all supplied content needs to be uppercase.withConstraints(TableBuilder.TableConstraints constraints) withElementChar(char elementChar) withElementCharStyle(net.kyori.adventure.text.format.Style style) withElementStyle(net.kyori.adventure.text.format.Style style) withFillChar(char fillChar) withFillCharStyle(net.kyori.adventure.text.format.Style style) withFont(org.bukkit.map.MapFont font) withHeader(String header) withHeaderStyle(net.kyori.adventure.text.format.Style style) withLeft(net.kyori.adventure.text.TextComponent left) withRight(net.kyori.adventure.text.TextComponent right) withSupplier(IntFunction<net.kyori.adventure.text.TextComponent> supplier)
-
Field Details
-
DEFAULT_CONSTRAINTS
-
DEFAULT_FONT
public static final org.bukkit.map.MapFont DEFAULT_FONT
-
-
Constructor Details
-
TableBuilder
public TableBuilder()
-
-
Method Details
-
withConstraints
-
withFont
-
withHeader
-
withLeft
-
withRight
-
withFillChar
-
withElementChar
-
withHeaderStyle
-
withElementStyle
-
withElementCharStyle
-
withFillCharStyle
-
withSupplier
-
withAttemptSinglePixelFix
When you use this method, all supplied content needs to be uppercase. Otherwise, the content will still be off by 1 pixel.- Returns:
- A non-null reference to this (builder pattern).
-
build
public net.kyori.adventure.text.TextComponent build() -
buildHeader
public net.kyori.adventure.text.TextComponent buildHeader()
-