From 46351e17830c9b76f6e3779a5ef2b0e014480956 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 6 Oct 2019 18:41:56 +1100 Subject: [PATCH] SPIGOT-5341: Add Material.isAir --- src/test/java/org/bukkit/PerMaterialTest.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/test/java/org/bukkit/PerMaterialTest.java b/src/test/java/org/bukkit/PerMaterialTest.java index b3dc09cd01..ba289fae8a 100644 --- a/src/test/java/org/bukkit/PerMaterialTest.java +++ b/src/test/java/org/bukkit/PerMaterialTest.java @@ -195,6 +195,15 @@ public class PerMaterialTest extends AbstractTestingBase { } } + @Test + public void testAir() { + if (material.isBlock()) { + assertThat(material.isAir(), is(equalTo(CraftMagicNumbers.getBlock(material).getBlockData().isAir()))); + } else { + assertThat(material.isAir(), is(equalTo(false))); + } + } + @Test public void testItem() { if (material == Material.AIR) {