java.lang.Object
com.winterhavenmc.library.messagebuilder.pipeline.resolvers.worldname.Multiverse4Retriever
All Implemented Interfaces:
WorldNameRetriever

public class Multiverse4Retriever extends Object implements 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 MVWorldManager to look up world metadata, including alias and display formatting.

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 Details

    • Multiverse4Retriever

      public Multiverse4Retriever(com.onarandombox.MultiverseCore.MultiverseCore plugin)
      Constructs a Multiverse4Retriever with the given Multiverse-Core instance.
      Parameters:
      plugin - the active MultiverseCore plugin instance
  • Method Details

    • getWorldName

      public Optional<String> getWorldName(org.bukkit.World world)
      Attempts to retrieve the alias name of the given World using the Multiverse world manager.

      If the world is not managed by Multiverse, or if plugin internals are unavailable, this method returns null.

      Specified by:
      getWorldName in interface WorldNameRetriever
      Parameters:
      world - the Bukkit world to retrieve an alias for
      Returns:
      the world alias from Multiverse, or null if unavailable