Fix Marker-position setters taking ints instead of doubles

This commit is contained in:
Lukas Rieger (Blue) 2022-12-13 23:45:45 +01:00
parent 3e9c7dd72c
commit 51d04e8135
No known key found for this signature in database
GPG Key ID: 2D09EC5ED2687FF2
3 changed files with 25 additions and 5 deletions

View File

@ -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;
}

View File

@ -103,7 +103,7 @@ public abstract class Marker {
* @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));
}
@ -160,7 +160,7 @@ public abstract class Marker {
* @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));
}
@ -186,6 +186,26 @@ public abstract class Marker {
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));
}
}

View File

@ -281,7 +281,7 @@ public class POIMarker extends DistanceRangedMarker implements DetailMarker, Ele
/**
* @deprecated use {@link #builder()} instead.
*/
@Deprecated
@Deprecated(forRemoval = true)
public static Builder toBuilder() {
return new Builder();
}