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 Summary
Modifier and TypeMethodDescriptionall()Returns a snapshot of every marker, by key.voidclear()Removes every marker.Returns a marker.voidput(Key key, MapDecoration decoration) Adds a marker, or replaces the one with the same key.booleanRemoves a marker.
-
Method Details
-
put
Adds a marker, or replaces the one with the same key.- Parameters:
key- the keydecoration- 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
Removes a marker.- Parameters:
key- the key- Returns:
- whether there was a marker with this key
- Since:
- 0.1.0
-
all
Map<Key, MapDecoration> 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
-