java.lang.Object
co.crystaldev.alpinecore.framework.config.object.ConfigMessage

public class ConfigMessage extends Object
A simple implementation of a configurable plugin message compatible with AlpineConfig.

Utilizes the Adventure framework for formatting.

Since:
0.1.0
See Also:
  • Field Details

  • Constructor Details

    • ConfigMessage

      protected ConfigMessage(@NotNull @NotNull List<String> message)
    • ConfigMessage

      protected ConfigMessage(@NotNull @NotNull String message)
  • Method Details

    • of

      @NotNull public static @NotNull ConfigMessage of(@NotNull @NotNull String component)
    • of

      @NotNull public static @NotNull ConfigMessage of(@NotNull @NotNull String... components)
    • 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:
    • 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:
    • 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