Interface BlueMapMap


public interface BlueMapMap
This class represents a map that is rendered by BlueMap of a specific world (BlueMapWorld). Each map belongs to a map configured in BlueMap's configuration file (in the maps: [] list).
  • Method Details

    • getId

      String getId()
      Returns this maps id, this is equal to the id configured in bluemap's config for this map.
      Returns:
      the id of this map
    • getName

      String getName()
      Returns this maps display-name, this is equal to the name configured in bluemap's config for this map.
      Returns:
      the name of this map
    • getWorld

      BlueMapWorld getWorld()
      Getter for the BlueMapWorld of this map.
      Returns:
      the BlueMapWorld of this map
    • getAssetStorage

      AssetStorage getAssetStorage()
      Getter for this map's AssetStorage.
      Each map has its own storage for assets. Assets that are stored here will be available to every webapp that is displaying this map. E.g. these assets are also available in server-networks.
      Returns:
      the AssetStorage of this map
    • getMarkerSets

      Map<String,MarkerSet> getMarkerSets()
      Getter for a (modifiable) Map of MarkerSets with the key being the MarkerSet's id. Changing this map will change the MarkerSets and markers displayed on the web-app for this map.
      Returns:
      a Map of MarkerSets.
    • getTileSize

      Vector2i getTileSize()
      Getter for the size of all tiles on this map in blocks.
      Returns:
      the tile-size in blocks
    • getTileOffset

      Vector2i getTileOffset()
      Getter for the offset of the tile-grid on this map.
      E.g. an offset of (2|-1) would mean that the tile (0|0) has block (2|0|-1) at it's min-corner.
      Returns:
      the tile-offset in blocks
    • setTileFilter

      void setTileFilter(Predicate<Vector2i> filter)

      Sets a filter that determines if a specific (hires) tile of this map should be updated or not. If this filter returns false for a tile, the "render"-process of this tile will be cancelled and the tile will be left untouched.

      Warning: Using this method will harm the integrity of the map! Since BlueMap will still assume that the tile got updated properly.

      Any previously set filters will get overwritten with the new one. You can get the current filter using getTileFilter() and combine them if you wish.

      Parameters:
      filter - The filter that will be used from now on.
    • setFrozen

      void setFrozen(boolean frozen)
      Freezes or unfreezes the map in the same way the `/bluemap freeze` command does. BlueMap will no longer attempt to update this map if it is frozen.
      Parameters:
      frozen - Whether the map will be frozen or not
    • isFrozen

      boolean isFrozen()
      Checks if the map is currently frozen
      Returns:
      true if the map is frozen, false otherwise
    • getTileFilter

      Predicate<Vector2i> getTileFilter()
      Returns the currently set TileFilter. The default TileFilter is equivalent to t -> true.
    • posToTile

      default Vector2i posToTile(double blockX, double blockZ)
      Converts a block-position to a map-tile-coordinate for this map
      Parameters:
      blockX - the x-position of the block
      blockZ - the z-position of the block
      Returns:
      the tile position
    • posToTile

      default Vector2i posToTile(Vector3i pos)
      Converts a block-position to a map-tile-coordinate for this map
      Parameters:
      pos - the position of the block
      Returns:
      the tile position
    • posToTile

      default Vector2i posToTile(Vector3d pos)
      Converts a block-position to a map-tile-coordinate for this map
      Parameters:
      pos - the position of the block
      Returns:
      the tile position