diff --git a/src/main/java/de/bluecolored/bluemap/api/markers/Marker.java b/src/main/java/de/bluecolored/bluemap/api/markers/Marker.java index 450e90a..71757b6 100644 --- a/src/main/java/de/bluecolored/bluemap/api/markers/Marker.java +++ b/src/main/java/de/bluecolored/bluemap/api/markers/Marker.java @@ -45,12 +45,14 @@ public abstract class Marker { private String label; private Vector3d position; private int sorting; + private boolean listed; public Marker(String type, String label, Vector3d position) { this.type = Objects.requireNonNull(type, "type cannot be null"); this.label = Objects.requireNonNull(label, "label cannot be null"); this.position = Objects.requireNonNull(position, "position cannot be null"); this.sorting = 0; + this.listed = true; } /** @@ -114,7 +116,7 @@ public void setPosition(double x, double y, double z) { * A lower value makes the marker sorted first (in lists and menus), a higher value makes it sorted later.
* If multiple markers have the same sorting-value, their order will be arbitrary.
* This value defaults to 0. - * @return This markers sorting-value + * @return this markers sorting-value */ public int getSorting() { return sorting; @@ -131,6 +133,24 @@ public void setSorting(int sorting) { this.sorting = sorting; } + /** + * This value defines whether the marker will be listed (true) in markers and lists by the webapp (additionally to being + * displayed on the map) or not (false). + * @return whether the marker will be listed or not + */ + public boolean isListed() { + return listed; + } + + /** + * Defines whether the marker will be listed (true) in markers and lists by the webapp (additionally to being + * displayed on the map) or not (false). + * @param listed whether the marker will be listed or not + */ + public void setListed(boolean listed) { + this.listed = listed; + } + @Override public boolean equals(Object o) { if (this == o) return true; @@ -156,6 +176,7 @@ public static abstract class Builder