Skip to content

Commit 51d04e8

Browse files
committed
Fix Marker-position setters taking ints instead of doubles
1 parent 3e9c7dd commit 51d04e8

File tree

3 files changed

+25
-5
lines changed

3 files changed

+25
-5
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,14 @@ public interface WebApp {
100100
* @deprecated You should use the {@link #getWebRoot()} method to create the image-files you need, or store map/marker
101101
* specific images in the map's storage (See: {@link BlueMapMap#getAssetStorage()})!
102102
*/
103-
@Deprecated
103+
@Deprecated(forRemoval = true)
104104
String createImage(BufferedImage image, String path) throws IOException;
105105

106106
/**
107107
* @deprecated You should use the {@link #getWebRoot()} method to find the image-files you need, or read map/marker
108108
* specific images from the map's storage (See: {@link BlueMapMap#getAssetStorage()})!
109109
*/
110-
@Deprecated
110+
@Deprecated(forRemoval = true)
111111
Map<String, String> availableImages() throws IOException;
112112

113113
}

src/main/java/de/bluecolored/bluemap/api/markers/Marker.java

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public void setPosition(Vector3d position) {
103103
* @param y the y-coordinate of the new position
104104
* @param z the z-coordinate of the new position
105105
*/
106-
public void setPosition(int x, int y, int z) {
106+
public void setPosition(double x, double y, double z) {
107107
setPosition(new Vector3d(x, y, z));
108108
}
109109

@@ -160,7 +160,7 @@ public B position(Vector3d position) {
160160
* @param z the z-coordinate of the new position
161161
* @return this builder for chaining
162162
*/
163-
public B position(int x, int y, int z) {
163+
public B position(double x, double y, double z) {
164164
return position(new Vector3d(x, y, z));
165165
}
166166

@@ -186,6 +186,26 @@ <O> O checkNotNull(O object, String name) {
186186
return object;
187187
}
188188

189+
// -----
190+
191+
/**
192+
* @deprecated use {@link #position(double, double, double)} instead
193+
*/
194+
@Deprecated(forRemoval = true)
195+
public B position(int x, int y, int z) {
196+
return position(new Vector3d(x, y, z));
197+
}
198+
199+
}
200+
201+
// -----
202+
203+
/**
204+
* @deprecated use {@link #setPosition(double, double, double)} instead
205+
*/
206+
@Deprecated(forRemoval = true)
207+
public void setPosition(int x, int y, int z) {
208+
setPosition(new Vector3d(x, y, z));
189209
}
190210

191211
}

src/main/java/de/bluecolored/bluemap/api/markers/POIMarker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ public POIMarker build() {
281281
/**
282282
* @deprecated use {@link #builder()} instead.
283283
*/
284-
@Deprecated
284+
@Deprecated(forRemoval = true)
285285
public static Builder toBuilder() {
286286
return new Builder();
287287
}

0 commit comments

Comments
 (0)