Skip to content

Commit 5e7219e

Browse files
committed
Add a way to get available images and push version
1 parent e22caff commit 5e7219e

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
org.gradle.jvmargs=-Xmx3G
22
org.gradle.daemon=false
33

4-
apiVersion=1.6.0
4+
apiVersion=1.7.0

src/main/java/de/bluecolored/bluemap/api/BlueMapAPI.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
*/
2525
package de.bluecolored.bluemap.api;
2626

27+
import com.flowpowered.math.vector.Vector2i;
2728
import de.bluecolored.bluemap.api.marker.Marker;
2829
import de.bluecolored.bluemap.api.marker.MarkerAPI;
2930
import de.bluecolored.bluemap.api.renderer.RenderAPI;
@@ -102,11 +103,24 @@ public abstract class BlueMapAPI {
102103
*
103104
* @param image the image to create
104105
* @param path the path/name of this image, the separator-char is '/'
105-
* @return the relative address of the image in the web-app
106+
* @return the relative address of the image in the web-app,
107+
* which can be used as it is e.g. in the {@link de.bluecolored.bluemap.api.marker.POIMarker#setIcon(String, Vector2i)} method
106108
* @throws IOException If an {@link IOException} is thrown while writing the image
107109
*/
108110
public abstract String createImage(BufferedImage image, String path) throws IOException;
109111

112+
/**
113+
* Lists all images that are available. This includes all images previously created with the {@link #createImage(BufferedImage, String)}
114+
* function, but might include more.
115+
* @return A map of available images where:
116+
* <ul>
117+
* <li>the <b>key</b> is the image path how it would be used in the "path" parameter of the {@link #createImage(BufferedImage, String)} method</li>
118+
* <li>and the <b>value</b> is the relative address of the image. The same ones that are returned from the {@link #createImage(BufferedImage, String)} method</li>
119+
* </ul>
120+
* @throws IOException If an {@link IOException} is thrown while reading the images
121+
*/
122+
public abstract Map<String, String> availableImages() throws IOException;
123+
110124
/**
111125
* Getter for the configured web-root folder
112126
* @return The {@link Path} of the web-root folder

0 commit comments

Comments
 (0)