Class PerUserLocaleCaptionMap
java.lang.Object
com.plotsquared.core.configuration.caption.LocalizedCaptionMap
com.plotsquared.core.configuration.caption.PerUserLocaleCaptionMap
- All Implemented Interfaces:
CaptionMap
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.plotsquared.core.configuration.caption.CaptionMap
CaptionMap.NoSuchCaptionException -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NonNull Set<TranslatableCaption>Gets a copy of the set of captions stored in the CaptionMap@NonNull StringgetMessage(@NonNull TranslatableCaption caption, @NonNull LocaleHolder localeHolder)Get a message using a specific localebooleansupportsLocale(@NonNull Locale locale)Check if the map supports a given localeMethods inherited from class com.plotsquared.core.configuration.caption.LocalizedCaptionMap
getLocale, getMessage
-
Constructor Details
-
PerUserLocaleCaptionMap
-
-
Method Details
-
getMessage
public @NonNull String getMessage(@NonNull TranslatableCaption caption, @NonNull LocaleHolder localeHolder) throws CaptionMap.NoSuchCaptionExceptionDescription copied from interface:CaptionMapGet a message using a specific locale- Specified by:
getMessagein interfaceCaptionMap- Overrides:
getMessagein classLocalizedCaptionMap- Parameters:
caption- Caption containing the caption keylocaleHolder- Holder that determines the message locale- Returns:
- Component
- Throws:
CaptionMap.NoSuchCaptionException- if no caption with the given key exists
-
supportsLocale
Description copied from interface:CaptionMapCheck if the map supports a given locale- Specified by:
supportsLocalein interfaceCaptionMap- Overrides:
supportsLocalein classLocalizedCaptionMap- Parameters:
locale- Locale- Returns:
- True if the map supports the locale
-
getCaptions
Description copied from interface:CaptionMapGets a copy of the set of captions stored in the CaptionMap- Specified by:
getCaptionsin interfaceCaptionMap- Overrides:
getCaptionsin classLocalizedCaptionMap- Returns:
- An immutable set of TranslatableCaption
-