Class LocalizedCaptionMap

java.lang.Object
com.plotsquared.core.configuration.caption.LocalizedCaptionMap
All Implemented Interfaces:
CaptionMap
Direct Known Subclasses:
PerUserLocaleCaptionMap

public class LocalizedCaptionMap extends Object implements CaptionMap
  • Constructor Details

  • Method Details

    • getMessage

      public @NonNull String getMessage(@NonNull TranslatableCaption caption)
      Description copied from interface: CaptionMap
      Get a message using the server locale
      Specified by:
      getMessage in interface CaptionMap
      Parameters:
      caption - Caption containing the caption key
      Returns:
      Component
    • getMessage

      public @NonNull String getMessage(@NonNull TranslatableCaption caption, @NonNull LocaleHolder localeHolder)
      Description copied from interface: CaptionMap
      Get a message using a specific locale
      Specified by:
      getMessage in interface CaptionMap
      Parameters:
      caption - Caption containing the caption key
      localeHolder - Holder that determines the message locale
      Returns:
      Component
    • supportsLocale

      public boolean supportsLocale(@NonNull Locale locale)
      Description copied from interface: CaptionMap
      Check if the map supports a given locale
      Specified by:
      supportsLocale in interface CaptionMap
      Parameters:
      locale - Locale
      Returns:
      True if the map supports the locale
    • getLocale

      public @NonNull Locale getLocale()
      Description copied from interface: CaptionMap
      Get the locale of the messages stored in the map
      Specified by:
      getLocale in interface CaptionMap
      Returns:
      Message locale
    • getCaptions

      public @NonNull Set<TranslatableCaption> getCaptions()
      Description copied from interface: CaptionMap
      Gets a copy of the set of captions stored in the CaptionMap
      Specified by:
      getCaptions in interface CaptionMap
      Returns:
      An immutable set of TranslatableCaption