Skip to content

Commit

Permalink
Fix Marker-position setters taking ints instead of doubles
Browse files Browse the repository at this point in the history
  • Loading branch information
TBlueF committed Dec 13, 2022
1 parent 3e9c7dd commit 51d04e8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/main/java/de/bluecolored/bluemap/api/WebApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,14 @@ public interface WebApp {
* @deprecated You should use the {@link #getWebRoot()} method to create the image-files you need, or store map/marker
* specific images in the map's storage (See: {@link BlueMapMap#getAssetStorage()})!
*/
@Deprecated
@Deprecated(forRemoval = true)
String createImage(BufferedImage image, String path) throws IOException;

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

}
24 changes: 22 additions & 2 deletions src/main/java/de/bluecolored/bluemap/api/markers/Marker.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public void setPosition(Vector3d position) {
* @param y the y-coordinate of the new position
* @param z the z-coordinate of the new position
*/
public void setPosition(int x, int y, int z) {
public void setPosition(double x, double y, double z) {
setPosition(new Vector3d(x, y, z));
}

Expand Down Expand Up @@ -160,7 +160,7 @@ public B position(Vector3d position) {
* @param z the z-coordinate of the new position
* @return this builder for chaining
*/
public B position(int x, int y, int z) {
public B position(double x, double y, double z) {
return position(new Vector3d(x, y, z));
}

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

// -----

/**
* @deprecated use {@link #position(double, double, double)} instead
*/
@Deprecated(forRemoval = true)
public B position(int x, int y, int z) {
return position(new Vector3d(x, y, z));
}

}

// -----

/**
* @deprecated use {@link #setPosition(double, double, double)} instead
*/
@Deprecated(forRemoval = true)
public void setPosition(int x, int y, int z) {
setPosition(new Vector3d(x, y, z));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ public POIMarker build() {
/**
* @deprecated use {@link #builder()} instead.
*/
@Deprecated
@Deprecated(forRemoval = true)
public static Builder toBuilder() {
return new Builder();
}
Expand Down

0 comments on commit 51d04e8

Please sign in to comment.