Class LocalizedCaptionMap
java.lang.Object
com.plotsquared.core.configuration.caption.LocalizedCaptionMap
- All Implemented Interfaces:
CaptionMap
- Direct Known Subclasses:
PerUserLocaleCaptionMap
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.plotsquared.core.configuration.caption.CaptionMap
CaptionMap.NoSuchCaptionException -
Constructor Summary
ConstructorsConstructorDescriptionLocalizedCaptionMap(Locale locale, Map<TranslatableCaption,String> captions) -
Method Summary
Modifier and TypeMethodDescription@NonNull Set<TranslatableCaption>Gets a copy of the set of captions stored in the CaptionMap@NonNull LocaleGet the locale of the messages stored in the map@NonNull StringgetMessage(@NonNull TranslatableCaption caption)Get a message using the server locale@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 locale
-
Constructor Details
-
LocalizedCaptionMap
-
-
Method Details
-
getMessage
Description copied from interface:CaptionMapGet a message using the server locale- Specified by:
getMessagein interfaceCaptionMap- Parameters:
caption- Caption containing the caption key- Returns:
- Component
-
getMessage
public @NonNull String getMessage(@NonNull TranslatableCaption caption, @NonNull LocaleHolder localeHolder)Description copied from interface:CaptionMapGet a message using a specific locale- Specified by:
getMessagein interfaceCaptionMap- Parameters:
caption- Caption containing the caption keylocaleHolder- Holder that determines the message locale- Returns:
- Component
-
supportsLocale
Description copied from interface:CaptionMapCheck if the map supports a given locale- Specified by:
supportsLocalein interfaceCaptionMap- Parameters:
locale- Locale- Returns:
- True if the map supports the locale
-
getLocale
Description copied from interface:CaptionMapGet the locale of the messages stored in the map- Specified by:
getLocalein interfaceCaptionMap- Returns:
- Message locale
-
getCaptions
Description copied from interface:CaptionMapGets a copy of the set of captions stored in the CaptionMap- Specified by:
getCaptionsin interfaceCaptionMap- Returns:
- An immutable set of TranslatableCaption
-