Package com.marcusslover.plus.lib.text
Class Text
java.lang.Object
com.marcusslover.plus.lib.text.Text
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescription@NotNull Text@NotNull Text@NotNull Textappend(@NotNull net.kyori.adventure.text.Component component) @NotNull Textclick(@Nullable net.kyori.adventure.text.event.ClickEvent click) @NotNull net.kyori.adventure.text.Componentcomp()@NotNull Textcopy()static @NotNull Textempty()@NotNull Textfont(@NotNull net.kyori.adventure.key.Key font) static @NotNull Stringgradient(@NotNull String text, @NotNull ColorGradient gradient) Creates a gradient text.@NotNull TextbooleanChecks if the component is empty.booleanisEmpty()Checks if the text is empty.booleanisEmpty(boolean strip) Checks if the text is empty.@NotNull Stringlegacy()static @NotNull StringDeprecated.static @NotNull TextDeserializes text using MiniMessage formatting.static @NotNull Textstatic @NotNull Textof(@NotNull net.kyori.adventure.text.Component component) @NotNull Stringraw()static @NotNull Textreset()@NotNull Textsend(net.kyori.adventure.audience.Audience audience) <T extends org.bukkit.command.CommandSender>
@NotNull Textsend(T target) <T extends org.bukkit.command.CommandSender>
@NotNull TextsendActionBar(@NotNull Collection<T> targets) @NotNull TextsendActionBar(@NotNull net.kyori.adventure.audience.Audience audience) <T extends org.bukkit.command.CommandSender>
@NotNull TextsendActionBar(T target) <T extends org.bukkit.command.CommandSender>
@NotNull TextsendActionBar(T... targets) @NotNull TextshadowColor(@NotNull String hexColor) Attempt to parse a shadow color from a #-prefixed hex string.@NotNull TextshadowColor(@NotNull net.kyori.adventure.text.format.ShadowColor color) @NotNull Stringstripped()toString()
-
Field Details
-
text
-
component
@NotNull protected @NotNull net.kyori.adventure.text.Component component
-
-
Method Details
-
of
-
of
@NotNull public static @NotNull Text of(@NotNull @NotNull net.kyori.adventure.text.Component component) -
mini
Deserializes text using MiniMessage formatting.- Returns:
- MiniMessage formatted text.
-
list
@Deprecated @NotNull public static @NotNull List<@NotNull Text> list(@NotNull @NotNull List<@NotNull net.kyori.adventure.text.Component> lore) Deprecated. -
gradient
@NotNull public static @NotNull String gradient(@NotNull @NotNull String text, @NotNull @NotNull ColorGradient gradient) Creates a gradient text.- Parameters:
text- the text to be colored.gradient- the gradient to be used.- Returns:
- the gradient text.
-
legacy
-
empty
-
reset
-
hover
-
click
@NotNull public @NotNull Text click(@Nullable @Nullable net.kyori.adventure.text.event.ClickEvent click) -
append
-
append
@NotNull public @NotNull Text append(@NotNull @NotNull net.kyori.adventure.text.Component component) -
append
-
font
-
raw
-
stripped
-
legacy
-
shadowColor
Attempt to parse a shadow color from a #-prefixed hex string. This string must be in the format #RRGGBBAA -
shadowColor
@NotNull public @NotNull Text shadowColor(@NotNull @NotNull net.kyori.adventure.text.format.ShadowColor color) -
isEmpty
public boolean isEmpty()Checks if the text is empty. (Does not remove spaces) If the text has spaces, it will not be considered empty.- Returns:
- true if the text is empty.
-
isEmpty
public boolean isEmpty(boolean strip) Checks if the text is empty.- Parameters:
strip- if the spaces should be removed.- Returns:
- true if the text is empty.
-
isCompEmpty
public boolean isCompEmpty()Checks if the component is empty.- Returns:
- true if the component is empty.
-
comp
@NotNull public @NotNull net.kyori.adventure.text.Component comp() -
copy
-
send
-
send
-
sendActionBar
@NotNull public @NotNull Text sendActionBar(@NotNull @NotNull net.kyori.adventure.audience.Audience audience) -
sendActionBar
@NotNull public <T extends org.bukkit.command.CommandSender> @NotNull Text sendActionBar(@NotNull T target) -
sendActionBar
@NotNull public <T extends org.bukkit.command.CommandSender> @NotNull Text sendActionBar(@NotNull @NotNull Collection<T> targets) -
sendActionBar
@NotNull public <T extends org.bukkit.command.CommandSender> @NotNull Text sendActionBar(@NotNull T... targets) -
toString
-