Class Component
java.lang.Object
me.unurled.srcore.utils.Component
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The message to display when an error occurs while executing a command.static final String
The message to display when the player does not have permission to use a command.static final String
The message to display when the player is not a player.static final String
The message to display when a player is not found. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull net.kyori.adventure.audience.Audience
audience
(org.bukkit.entity.Player player) Gets an audience for a player.static @NotNull net.kyori.adventure.text.Component
Converts a string to a MiniMessage component.static List
<net.kyori.adventure.text.Component> fromStringList
(@NotNull List<String> list) Converts a list of strings to a list of MiniMessage components.static @NotNull net.kyori.adventure.text.TextComponent
Converts a string to a TextComponent.
-
Field Details
-
NOT_PLAYER
The message to display when the player is not a player.- See Also:
-
NO_PERMISSION
The message to display when the player does not have permission to use a command.- See Also:
-
ERROR
The message to display when an error occurs while executing a command.- See Also:
-
PLAYER_NOT_FOUND
The message to display when a player is not found.- See Also:
-
-
Method Details
-
comp
Converts a string to a MiniMessage component.- Parameters:
msg
- the string to convert- Returns:
- the MiniMessage component
-
textComp
Converts a string to a TextComponent.- Parameters:
msg
- the string to convert- Returns:
- the TextComponent
-
fromStringList
-
audience
@Contract(pure=true) @NotNull public static @NotNull net.kyori.adventure.audience.Audience audience(org.bukkit.entity.Player player) Gets an audience for a player.- Parameters:
player
- the player- Returns:
- the audience
-