java.lang.Object
com.winterhavenmc.library.messagebuilder.adapters.pipeline.resolvers.worldname.MultiverseResolver
All Implemented Interfaces:
WorldNameResolver

public final class MultiverseResolver extends Object implements 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

    Constructors
    Constructor
    Description
    MultiverseResolver(org.bukkit.plugin.Plugin mvPlugin)
    Constructs a MultiverseV4WorldNameResolver using the given instance of MultiverseCore.
  • Method Summary

    Modifier and Type
    Method
    Description
    resolve(org.bukkit.World world)
    Attempts to retrieve the alias name of the specified world using Multiverse4Retriever.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MultiverseResolver

      public MultiverseResolver(org.bukkit.plugin.Plugin mvPlugin)
      Constructs a MultiverseV4WorldNameResolver using the given instance of MultiverseCore.
      Parameters:
      mvPlugin - the active Multiverse-Core plugin instance
  • Method Details

    • resolve

      public String resolve(org.bukkit.World world)
      Attempts to retrieve the alias name of the specified world using Multiverse4Retriever. If the alias is null or blank, falls back to world.getName().
      Specified by:
      resolve in interface WorldNameResolver
      Parameters:
      world - the World whose alias or name should be returned
      Returns:
      the Multiverse alias if available, otherwise the Bukkit world name, or "∅" (NULL symbol) if the world is null