Class MessageRenderer

java.lang.Object
com.ultikits.ultitools.text.internal.MessageRenderer

@Internal public final class MessageRenderer extends Object
The single locale-aware lookup and argument formatting implementation.
  • Field Details

  • Constructor Details

  • Method Details

    • render

      public net.kyori.adventure.text.Component render(Text text, Locale locale)
      Renders literal or translated text in the requested locale.
    • argumentResolver

      private net.kyori.adventure.text.minimessage.tag.resolver.TagResolver argumentResolver(Arg arg, Locale locale, MessageKey key)
    • reportFormat

      private void reportFormat(MessageKey key, Locale locale, String argument, RuntimeException malformed)
    • log

      private void log(String message, MessageKey key, Locale locale, @Nullable @Nullable String argument, @Nullable @Nullable Throwable failure)
    • formatArgument

      private net.kyori.adventure.text.Component formatArgument(Arg arg, Locale locale, net.kyori.adventure.text.minimessage.tag.resolver.ArgumentQueue arguments, net.kyori.adventure.text.minimessage.Context context)
    • number

      private net.kyori.adventure.text.Component number(Arg.Numeric numeric, Locale locale, net.kyori.adventure.text.minimessage.tag.resolver.ArgumentQueue arguments, net.kyori.adventure.text.minimessage.Context context)
    • choice

      private static net.kyori.adventure.text.Component choice(Arg.Numeric numeric, net.kyori.adventure.text.minimessage.tag.resolver.ArgumentQueue arguments, net.kyori.adventure.text.minimessage.Context context)
    • safeDefault

      private net.kyori.adventure.text.Component safeDefault(Arg arg, Locale locale)
    • defaultValue

      private net.kyori.adventure.text.Component defaultValue(Arg arg, Locale locale)
    • defaultTimeFormat

      private static DateTimeFormatter defaultTimeFormat(TemporalAccessor value)
    • temporal

      private static TemporalAccessor temporal(Arg.Moment moment)
    • lookup

      @Nullable private @Nullable String lookup(MessageKey key, Locale locale)
    • addCandidate

      private static void addCandidate(Set<Locale> candidates, Locale locale)