From d0acafa8d88a85702b72b2b61e7713be094eec1a Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Tue, 23 Nov 2021 18:49:11 +1100 Subject: [PATCH] SPIGOT-6781: Add Block#canPlace By: coll1234567 --- paper-api/src/main/java/org/bukkit/block/Block.java | 9 +++++++++ 1 file changed, 9 insertions(+) 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 da0964b1b6..ce1e1e6cc6 100644 --- a/paper-api/src/main/java/org/bukkit/block/Block.java +++ b/paper-api/src/main/java/org/bukkit/block/Block.java @@ -511,4 +511,13 @@ public interface Block extends Metadatable { */ @NotNull VoxelShape getCollisionShape(); + + /** + * Checks if this block is a valid placement location for the specified + * block data. + * + * @param data the block data to check + * @return true if the block data can be placed here + */ + boolean canPlace(@NotNull BlockData data); }