From 5e7219e9215696de4542d6eda7bd40638dbcbd2d Mon Sep 17 00:00:00 2001 From: "Blue (Lukas Rieger)" Date: Sun, 19 Sep 2021 18:51:29 +0200 Subject: [PATCH] Add a way to get available images and push version --- gradle.properties | 2 +- .../de/bluecolored/bluemap/api/BlueMapAPI.java | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 6401cb1..baa2ad2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ org.gradle.jvmargs=-Xmx3G org.gradle.daemon=false -apiVersion=1.6.0 +apiVersion=1.7.0 diff --git a/src/main/java/de/bluecolored/bluemap/api/BlueMapAPI.java b/src/main/java/de/bluecolored/bluemap/api/BlueMapAPI.java index 1307ddb..16e6fb4 100644 --- a/src/main/java/de/bluecolored/bluemap/api/BlueMapAPI.java +++ b/src/main/java/de/bluecolored/bluemap/api/BlueMapAPI.java @@ -24,6 +24,7 @@ */ package de.bluecolored.bluemap.api; +import com.flowpowered.math.vector.Vector2i; import de.bluecolored.bluemap.api.marker.Marker; import de.bluecolored.bluemap.api.marker.MarkerAPI; import de.bluecolored.bluemap.api.renderer.RenderAPI; @@ -102,11 +103,24 @@ public abstract class BlueMapAPI { * * @param image the image to create * @param path the path/name of this image, the separator-char is '/' - * @return the relative address of the image in the web-app + * @return the relative address of the image in the web-app, + * which can be used as it is e.g. in the {@link de.bluecolored.bluemap.api.marker.POIMarker#setIcon(String, Vector2i)} method * @throws IOException If an {@link IOException} is thrown while writing the image */ public abstract String createImage(BufferedImage image, String path) throws IOException; + /** + * Lists all images that are available. This includes all images previously created with the {@link #createImage(BufferedImage, String)} + * function, but might include more. + * @return A map of available images where: + * + * @throws IOException If an {@link IOException} is thrown while reading the images + */ + public abstract Map availableImages() throws IOException; + /** * Getter for the configured web-root folder * @return The {@link Path} of the web-root folder