Class LocalizedMessages

java.lang.Object
net.realdarkstudios.commons.util.LocalizedMessages

public class LocalizedMessages extends Object
  • Constructor Details

    • LocalizedMessages

      public LocalizedMessages()
  • Method Details

    • send

      public static void send(org.bukkit.command.CommandSender sender, LocalizedMessages.Key key, Object... formatArgs)
      Sends the translated key with the format arguments
      Parameters:
      sender - The CommandSender to send the message to
      key - The LocalizedMessages.Key to send
      formatArgs - The format arguments
      Since:
      0.3.1.0
    • sendWithPrefix

      public static void sendWithPrefix(org.bukkit.command.CommandSender sender, LocalizedMessages.Key key, Object... formatArgs)
    • sendMessages

      public static void sendMessages(org.bukkit.command.CommandSender sender, String... messages)
    • sendComponents

      public static void sendComponents(org.bukkit.command.CommandSender sender, net.md_5.bungee.api.chat.TextComponent... textComponents)
    • send

      public static void send(org.bukkit.command.CommandSender sender, LocalizedMessages.Key key, LocalizedMessages.StyleOptions styleOverride, Object... formatArgs)
      Sends the translated key with the format arguments
      Parameters:
      sender - The CommandSender to send the message to
      key - The LocalizedMessages.Key to send
      styleOverride - The LocalizedMessages.StyleOptions that will be applied instead of the key's
      formatArgs - The format arguments
      Since:
      0.3.1.0
    • sendWithPrefix

      public static void sendWithPrefix(org.bukkit.command.CommandSender sender, LocalizedMessages.Key key, LocalizedMessages.StyleOptions styleOverride, Object... formatArgs)
      Sends the translated key with the format arguments
      Parameters:
      sender - The CommandSender to send the message to
      key - The LocalizedMessages.Key to send
      styleOverride - The LocalizedMessages.StyleOptions that will be applied instead of the key's
      formatArgs - The format arguments
      Since:
      0.3.1.0
    • translation

      public static net.md_5.bungee.api.chat.TextComponent translation(@NotNull LocalizedMessages.Key primaryKey, @NotNull LocalizedMessages.Key backupKey, boolean withPrefix, Object... formatArgs)
      Returns the translated message with style options
      Parameters:
      primaryKey - The primary LocalizedMessages.Key
      backupKey - The backup LocalizedMessages.Key (used if the primary one doesn't exist)
      formatArgs - The format arguments
      Returns:
      The TextComponent
      Since:
      0.3.1.0
    • translationC

      public static String translationC(@NotNull LocalizedMessages.Key primaryKey, @NotNull LocalizedMessages.Key backupKey, boolean withPrefix, Object... formatArgs)