Class MessageHandler

java.lang.Object
net.tnemc.plugincore.core.io.message.MessageHandler

public class MessageHandler extends Object
The core class for translating plugin messages
Since:
0.1.2.0
Author:
creatorfromhell
  • Field Details

    • MINI_MESSAGE

      public static final net.kyori.adventure.text.minimessage.MiniMessage MINI_MESSAGE
  • Constructor Details

  • Method Details

    • grab

      public static net.kyori.adventure.text.Component grab(MessageData messageData, @NotNull @NotNull PlayerProvider player)
      Used to translate a message for a player and return the translated Component.
      Parameters:
      messageData - The message data to utilize for this translation.
      player - The player to translate this for.
      Returns:
      The Component that is the result of the translation process of the message for the given player.
    • grab

      public static net.kyori.adventure.text.Component grab(MessageData messageData, @NotNull @NotNull UUID id)
      Used to translate a message for a player and return the translated Component.
      Parameters:
      messageData - The message data to utilize for this translation.
      id - The unique identifier of the player to translate this for.
      Returns:
      The Component that is the result of the translation process of the message for the given player.
    • translate

      public static void translate(MessageData messageData, UUID identifier, net.kyori.adventure.audience.Audience audience)
      Used to translate a message for an Audience.
      Parameters:
      messageData - The message data to utilize for this translation.
      audience - The audience that should receive the translated message.
    • translate

      public static void translate(MessageData messageData, UUID identifier, net.kyori.adventure.audience.Audience... audiences)
      Used to translate a message for numerous players.
      Parameters:
      messageData - The message data to utilize for this translation.
      audiences - The audiences that should receive the translated message.
    • getMini

      public net.kyori.adventure.text.minimessage.MiniMessage getMini()
    • getTranslator

    • getInstance

      public static MessageHandler getInstance()