Class Multiverse5Retriever
java.lang.Object
com.winterhavenmc.library.messagebuilder.pipeline.resolvers.worldname.Multiverse5Retriever
- All Implemented Interfaces:
WorldNameRetriever
A
WorldNameRetriever
implementation that retrieves the alias name of a
World
using the Multiverse-Core API.
This class interacts directly with MultiverseCore
and its WorldManager
to look up world metadata, including alias and display formatting. This implementation
retrieves a world alias or name using Multiverse version 5.
If the world is not managed by Multiverse, or if any part of the plugin's world
management system is unavailable, this retriever returns null
.
Typically used internally by PluginResolver
, and not intended
to be used directly unless fine-grained access to Multiverse aliases is needed.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMultiverse5Retriever
(org.mvplugins.multiverse.core.MultiverseCore plugin) Constructs aMultiverse4Retriever
with the given Multiverse-Core instance. -
Method Summary
Modifier and TypeMethodDescriptiongetWorldName
(org.bukkit.World world) Attempts to retrieve the alias or name of the givenWorld
using the Multiverse world manager.
-
Constructor Details
-
Multiverse5Retriever
public Multiverse5Retriever(org.mvplugins.multiverse.core.MultiverseCore plugin) Constructs aMultiverse4Retriever
with the given Multiverse-Core instance.- Parameters:
plugin
- the activeMultiverseCore
plugin instance
-
-
Method Details
-
getWorldName
Attempts to retrieve the alias or name of the givenWorld
using the Multiverse world manager.If the world is not managed by Multiverse, or if plugin internals are unavailable, this method returns an empty
Optional
- Specified by:
getWorldName
in interfaceWorldNameRetriever
- Parameters:
world
- the Bukkit world to retrieve an alias for- Returns:
- the world alias or name from Multiverse, or an empty
Optional
if unavailable
-