diff options
author | blablubbabc <lukas@wirsindwir.de> | 2018-10-12 01:03:01 +0200 |
---|---|---|
committer | md_5 <git@md-5.net> | 2018-10-13 09:49:20 +1100 |
commit | 0e17dc03f99c653e54c15d9176825bc75443b134 (patch) | |
tree | 4a790e925cc3de78e5aaa9325252618ccbcab73e /src | |
parent | ee12ca7b712793de5356eec6a9162073faae88f8 (diff) | |
download | bukkit-0e17dc03f99c653e54c15d9176825bc75443b134.tar bukkit-0e17dc03f99c653e54c15d9176825bc75443b134.tar.gz bukkit-0e17dc03f99c653e54c15d9176825bc75443b134.tar.lz bukkit-0e17dc03f99c653e54c15d9176825bc75443b134.tar.xz bukkit-0e17dc03f99c653e54c15d9176825bc75443b134.zip |
Add Block#isPassable
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/block/Block.java | 13 |
1 files changed, 13 insertions, 0 deletions
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<ItemStack> getDrops(ItemStack tool); + /** + * Checks if this block is passable. + * <p> + * A block is passable if it has no colliding parts that would prevent + * players from moving through it. + * <p> + * 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 <code>true</code> if passable + */ + boolean isPassable(); } |