Package com.winterhavenmc.library.messagebuilder.pipeline.resolvers.worldname
package com.winterhavenmc.library.messagebuilder.pipeline.resolvers.worldname
Provides integration with external world-aliasing systems, such as
Multiverse-Core, for resolving user-friendly world names
to be used in macro-based message templates.
This package defines a two-layered abstraction for world name resolution:
WorldNameRetriever
– A simple strategy interface for mapping aWorld
to a display name.WorldNameResolver
– A runtime-aware interface that conditionally selects between Multiverse and default implementations based on plugin availability.
Runtime Integration
IfMultiverse-Core
is detected and enabled at runtime, the resolver system will use
MultiverseV4WorldNameResolver
to obtain world aliases. Otherwise, it falls back to
DefaultResolver
,
which uses the world’s raw Bukkit name.
Usage
This package supports the replacement of macros like{WORLD.NAME}
in message templates
via MessageBuilderLib's macro resolution pipeline.- See Also:
-
ClassDescriptionDefault implementation of
WorldNameResolver
that returns the raw name of aWorld
usingWorld#getName()
.AWorldNameRetriever
implementation that retrieves the alias name of aWorld
using the Multiverse-Core API.AWorldNameRetriever
implementation that retrieves the alias name of aWorld
using the Multiverse-Core API.AWorldNameRetriever
implementation that retrieves the alias name of aWorld
using the Multiverse-Core API.AWorldNameResolver
implementation that retrieves world name aliases using the Multiverse-Core plugin.A runtime-resolvable strategy interface for obtaining a display-friendly name for aWorld
, optionally integrating with external plugins such as Multiverse-Core.Strategy interface for retrieving a user-friendly name for a givenWorld
.