diff --git a/src/main/java/de/bluecolored/bluemap/api/math/Line.java b/src/main/java/de/bluecolored/bluemap/api/math/Line.java index 34f7993..0c45a5f 100644 --- a/src/main/java/de/bluecolored/bluemap/api/math/Line.java +++ b/src/main/java/de/bluecolored/bluemap/api/math/Line.java @@ -160,6 +160,16 @@ public Builder addPoints(Vector3d... points) { return this; } + /** + * Adds multiple points to the end of line. + * @param points the points to be added. + * @return this builder for chaining + */ + public Builder addPoints(Collection<Vector3d> points) { + this.points.addAll(points); + return this; + } + /** * Builds a new {@link Line} with the points set in this builder.<br> * There need to be at least 2 points to build a {@link Line}. diff --git a/src/main/java/de/bluecolored/bluemap/api/math/Shape.java b/src/main/java/de/bluecolored/bluemap/api/math/Shape.java index ce2f373..8223906 100644 --- a/src/main/java/de/bluecolored/bluemap/api/math/Shape.java +++ b/src/main/java/de/bluecolored/bluemap/api/math/Shape.java @@ -248,6 +248,16 @@ public Builder addPoints(Vector2d... points) { return this; } + /** + * Adds multiple points to the end of line. + * @param points the points to be added. + * @return this builder for chaining + */ + public Builder addPoints(Collection<Vector2d> points) { + this.points.addAll(points); + return this; + } + /** * Builds a new {@link Shape} with the points set in this builder.<br> * There need to be at least 3 points to build a {@link Shape}.