Class MultiverseResolver
java.lang.Object
com.winterhavenmc.library.messagebuilder.adapters.pipeline.resolvers.worldname.MultiverseResolver
- All Implemented Interfaces:
WorldNameResolver
A
WorldNameResolver implementation that retrieves world name aliases
using the Multiverse-Core plugin.
If an alias is found for the given World, it is returned as the
display name. If no alias is available (e.g., null or blank), the resolver
falls back to the default world name from WorldInfo.getName().
If the input world is null, this resolver returns the string
"NULL WORLD".
TODO: edit this comment to reflect the removal of the get method
This class is only instantiated when Multiverse-Core is detected and enabled
at runtime. Use WorldNameResolver#get(PluginManager) to safely select
the appropriate implementation.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMultiverseResolver(org.bukkit.plugin.Plugin mvPlugin) Constructs aMultiverseV4WorldNameResolverusing the given instance ofMultiverseCore. -
Method Summary
-
Constructor Details
-
MultiverseResolver
public MultiverseResolver(org.bukkit.plugin.Plugin mvPlugin) Constructs aMultiverseV4WorldNameResolverusing the given instance ofMultiverseCore.- Parameters:
mvPlugin- the active Multiverse-Core plugin instance
-
-
Method Details
-
resolve
Attempts to retrieve the alias name of the specified world usingMultiverse4Retriever. If the alias is null or blank, falls back toworld.getName().- Specified by:
resolvein interfaceWorldNameResolver- Parameters:
world- theWorldwhose alias or name should be returned- Returns:
- the Multiverse alias if available, otherwise the Bukkit world name,
or
"∅"(NULL symbol) if the world isnull
-