diff --git a/paper-api/src/main/java/org/bukkit/block/Block.java b/paper-api/src/main/java/org/bukkit/block/Block.java index ffc20d81f8..933b90fe1e 100644 --- a/paper-api/src/main/java/org/bukkit/block/Block.java +++ b/paper-api/src/main/java/org/bukkit/block/Block.java @@ -137,6 +137,14 @@ public interface Block extends Metadatable { */ Location getLocation(); + /** + * Stores the location of the block in the provided Location object.
+ * If the provided Location is null this method does nothing and returns null. + * + * @return The Location object provided or null + */ + Location getLocation(Location loc); + /** * Gets the chunk which contains this block * diff --git a/paper-api/src/main/java/org/bukkit/block/BlockState.java b/paper-api/src/main/java/org/bukkit/block/BlockState.java index c727d0e0e1..08b10e6fa6 100644 --- a/paper-api/src/main/java/org/bukkit/block/BlockState.java +++ b/paper-api/src/main/java/org/bukkit/block/BlockState.java @@ -87,6 +87,14 @@ public interface BlockState extends Metadatable { */ Location getLocation(); + /** + * Stores the location of this block in the provided Location object.
+ * If the provided Location is null this method does nothing and returns null. + * + * @return The Location object provided or null + */ + Location getLocation(Location loc); + /** * Gets the chunk which contains this block * diff --git a/paper-api/src/main/java/org/bukkit/entity/Entity.java b/paper-api/src/main/java/org/bukkit/entity/Entity.java index 9058429b6d..a9df5c5c8a 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Entity.java +++ b/paper-api/src/main/java/org/bukkit/entity/Entity.java @@ -24,6 +24,14 @@ public interface Entity extends Metadatable { */ public Location getLocation(); + /** + * Stores the entity's current position in the provided Location object.
+ * If the provided Location is null this method does nothing and returns null. + * + * @return The Location object provided or null + */ + public Location getLocation(Location loc); + /** * Sets this entity's velocity *