Interface MapEngineApi


public interface MapEngineApi
The main API class for the MapEngine plugin.
  • Method Details

    • instance

      @NotNull static @NotNull MapEngineApi instance()
      Utility method to get the instance of the MapEngineApi. You can also use Bukkit.getServicesManager() to get the instance.

      WARNING: If MapEngine is not properly enabled before using this method, it will throw an exception.
      Returns:
      the instance of the MapEngineApi
      Throws:
      IllegalStateException - if MapEngine is not enabled before calling this method
    • colors

      IMapColors colors()
      Returns:
      the color palette used for converting RGB colors to map colors and back
    • pipeline

      IPipelineProvider pipeline()
      Returns:
      the pipeline provider used for creating stuff related to pipelining and updating IMapDisplay's
    • displayProvider

      IDisplayProvider displayProvider()
      Returns:
      the display provider used for creating IMapDisplay's and IHoldableDisplay's
    • mapDisplays

      @Unmodifiable Set<IMapDisplay> mapDisplays()
      Returns:
      all currently active IMapDisplay's
    • holdableDisplays

      @Unmodifiable Set<IHoldableDisplay> holdableDisplays()
      Returns:
      all currently active IHoldableDisplay's
    • displayInView

      @Deprecated @Nullable @Nullable IMapDisplay displayInView(org.bukkit.entity.Player player, int maxDistance)
      Used to get a IMapDisplay in the view of the specified player.
      Parameters:
      player - the player to check for
      maxDistance - the maximum ray distance to check for a display
      Returns:
      the display in view or null if nothing was found
    • traceDisplayInView

      @Nullable @Nullable MapTraceResult traceDisplayInView(org.bukkit.entity.Player player)
      Used to get a map display and the ray hit point in the view of a player.
      Parameters:
      player - the player to check for
      Returns:
      the trace result or null if nothing was found
    • traceDisplayInView

      @Nullable @Nullable MapTraceResult traceDisplayInView(org.bukkit.entity.Player player, int maxDistance)
      Used to get a map display and the ray hit point in the view of a player.
      Parameters:
      player - the player to check for
      maxDistance - the maximum ray distance to check for a display
      Returns:
      the trace result or null if nothing was found