Package com.winterhavenmc.library.messagebuilder.models.configuration
package com.winterhavenmc.library.messagebuilder.models.configuration
Provides configuration accessors for server-defined language, locale, and timezone settings.
This package defines interfaces and implementations used to retrieve specific configuration
values from a plugin's config.yml file. These values are exposed via lightweight
ConfigProvider
wrappers, which encapsulate Suppler instances to ensure
up-to-date resolution of values at the time of use.
Key Components
- LanguageProvider – Retrieves the server's configured language tag (e.g.,
en-US). ConfigRepository– Retrieves both the locale and timezone, used for date/time and number formatting.LanguageSettingandLocaleSetting– Simple record types that wrap parsed configuration values.LanguageTag– A utility class for parsing and validating IETF BCP 47 language tags.
Resolution Behavior
Providers attempt to resolve values from the plugin configuration in order of preference, falling back to system defaults if not present or invalid. This allows server operators to easily configure language and formatting behavior while retaining safe defaults.
-
ClassDescriptionRepresents a functional interface for retrieving dynamic configuration values.Represents a configured language file identifier.A class that wraps a string-based IETF BCP 47 language tag, allowing for validation against locales that are known to the system at runtime.Represents a locale setting derived from a valid
LanguageTag.