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.
  • LanguageSetting and LocaleSetting – 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.