Class ConfigMessage
java.lang.Object
co.crystaldev.alpinecore.framework.config.object.ConfigMessage
A simple implementation of a configurable plugin message
compatible with
AlpineConfig
.
Utilizes the Adventure framework for formatting.
- Since:
- 0.1.0
- See Also:
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
ConfigMessage
(@NotNull String message) protected
ConfigMessage
(@NotNull List<String> message) -
Method Summary
Modifier and TypeMethodDescription@NotNull net.kyori.adventure.text.Component
build
(@NotNull AlpinePlugin plugin, @NotNull Object... placeholders) Formats the text of this message with placeholders, then deserializes it using Adventure's MiniMessage.@NotNull net.kyori.adventure.text.Component
build
(@NotNull AlpinePlugin plugin, @NotNull Map<String, Object> placeholders) Formats the text of this message with placeholders, then deserializes it using Adventure's MiniMessage.@NotNull String
buildString
(@NotNull AlpinePlugin plugin, @NotNull Object... placeholders) Formats the text of this message with placeholders@NotNull String
buildString
(@NotNull AlpinePlugin plugin, @NotNull Map<String, Object> placeholders) Formats the text of this message with placeholdersstatic @NotNull ConfigMessage
static @NotNull ConfigMessage
-
Field Details
-
message
-
-
Constructor Details
-
ConfigMessage
-
ConfigMessage
-
-
Method Details
-
of
-
of
-
build
@NotNull public @NotNull net.kyori.adventure.text.Component build(@NotNull @NotNull AlpinePlugin plugin, @NotNull @NotNull Object... placeholders) Formats the text of this message with placeholders, then deserializes it using Adventure's MiniMessage.Components
should be used to send the result of this method.- Parameters:
placeholders
- The placeholders for formatting the message- Returns:
- The
Component
- See Also:
-
Components
MiniMessage
-
build
@NotNull public @NotNull net.kyori.adventure.text.Component build(@NotNull @NotNull AlpinePlugin plugin, @NotNull @NotNull Map<String, Object> placeholders) Formats the text of this message with placeholders, then deserializes it using Adventure's MiniMessage.Components
should be used to send the result of this method.- Parameters:
placeholders
- The placeholders for formatting the message- Returns:
- The
Component
- See Also:
-
Components
MiniMessage
-
buildString
@NotNull public @NotNull String buildString(@NotNull @NotNull AlpinePlugin plugin, @NotNull @NotNull Object... placeholders) Formats the text of this message with placeholders- Parameters:
placeholders
- The placeholders for formatting the message- Returns:
- The string
-
buildString
@NotNull public @NotNull String buildString(@NotNull @NotNull AlpinePlugin plugin, @NotNull @NotNull Map<String, Object> placeholders) Formats the text of this message with placeholders- Parameters:
placeholders
- The placeholders for formatting the message- Returns:
- The string
-