Interface Squaremap


public interface Squaremap
squaremap API

The API allows other plugins on the server integrate with squaremap.

This interface represents the base of the API package. All functions are accessed via this interface.

To start using the API, you need to obtain an instance of this interface. These are registered by the squaremap plugin to the platforms Services Manager. This is the preferred method for obtaining an instance.

For ease of use, an instance can also be obtained from the static singleton accessor in SquaremapProvider.

  • Method Details

    • mapWorlds

      @NonNull Collection<MapWorld> mapWorlds()
      Get an unmodifiable view of the enabled worlds
      Returns:
      The set of worlds
    • getWorldIfEnabled

      @NonNull Optional<MapWorld> getWorldIfEnabled(@NonNull WorldIdentifier identifier)
      Get an optional which will either
      • A) Be empty, if the world does not exist, or does not have squaremap enabled
      • B) Contain the MapWorld instance for the World associated with the provided WorldIdentifier, if the world exists and has squaremap enabled
      Parameters:
      identifier - world identifier
      Returns:
      optional
    • iconRegistry

      @NonNull Registry<BufferedImage> iconRegistry()
      Get the registry of images which can be used with icon markers
      Returns:
      icon registry
    • playerManager

      @NonNull PlayerManager playerManager()
      Get the player manager
      Returns:
      player manager
    • webDir

      @NonNull Path webDir()
      Get the web directory
      Returns:
      web directory