Interface MapMarkers


public interface MapMarkers
The icons a MapView keeps and saves, each under a key of your choosing.

Use your own namespace, myplugin:shop for instance, so that plugins never replace each other's markers. Markers are shown to everyone who sees the map. Banners players mark with a map are stored here too, under fidorial:banner/<x>/<y>/<z>; they disappear on their own when the banner is broken. Icons that change often or depend on who looks are better drawn by a MapLayer.

Since:
0.1.0
  • Method Details

    • put

      void put(Key key, MapDecoration decoration)
      Adds a marker, or replaces the one with the same key.
      Parameters:
      key - the key
      decoration - the icon
      Since:
      0.1.0
    • get

      Returns a marker.
      Parameters:
      key - the key
      Returns:
      the icon, or empty if there is no marker with this key
      Since:
      0.1.0
    • remove

      boolean remove(Key key)
      Removes a marker.
      Parameters:
      key - the key
      Returns:
      whether there was a marker with this key
      Since:
      0.1.0
    • all

      Returns a snapshot of every marker, by key.
      Returns:
      a snapshot of every marker, by key
      Since:
      0.1.0
    • clear

      void clear()
      Removes every marker.
      Since:
      0.1.0