Interface LocaleResolver

All Known Implementing Classes:
ConfiguredLocaleResolver

@NonExtendable public interface LocaleResolver
The single decision point for recipient locale preference, separate from catalogue lookup. With language=auto, a player resolves to Player#locale(); with a concrete language every player resolves to that forced locale. All non-player audiences, including console, command blocks and plugin audiences, resolve to fallback() in both modes.

Thread-safe and pure with respect to its inputs: player locale is never cached, so a client language change is visible on the next call. A later per-player override can replace this injected service without changing its callers.

  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the operator's fallback language, also used for console output.
    Returns the forced language, or empty in auto mode.
    resolve(net.kyori.adventure.audience.Audience audience)
    Returns the recipient's preferred locale, without checking catalogue availability.
  • Method Details

    • resolve

      Locale resolve(net.kyori.adventure.audience.Audience audience)
      Returns the recipient's preferred locale, without checking catalogue availability.
    • fallback

      Locale fallback()
      Returns the operator's fallback language, also used for console output.
    • forced

      Optional<Locale> forced()
      Returns the forced language, or empty in auto mode.