From 0e17dc03f99c653e54c15d9176825bc75443b134 Mon Sep 17 00:00:00 2001 From: blablubbabc Date: Fri, 12 Oct 2018 01:03:01 +0200 Subject: Add Block#isPassable --- src/main/java/org/bukkit/block/Block.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/main/java/org') diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java index 679c29cf..f3fe0b47 100644 --- a/src/main/java/org/bukkit/block/Block.java +++ b/src/main/java/org/bukkit/block/Block.java @@ -356,4 +356,17 @@ public interface Block extends Metadatable { */ Collection getDrops(ItemStack tool); + /** + * Checks if this block is passable. + *

+ * A block is passable if it has no colliding parts that would prevent + * players from moving through it. + *

+ * Examples: Tall grass, flowers, signs, etc. are passable, but open doors, + * fence gates, trap doors, etc. are not because they still have parts that + * can be collided with. + * + * @return true if passable + */ + boolean isPassable(); } -- cgit v1.2.3