diff --git a/src/main/java/com/sk89q/worldguard/bukkit/util/Materials.java b/src/main/java/com/sk89q/worldguard/bukkit/util/Materials.java index 12e1a095..1c87b595 100644 --- a/src/main/java/com/sk89q/worldguard/bukkit/util/Materials.java +++ b/src/main/java/com/sk89q/worldguard/bukkit/util/Materials.java @@ -531,6 +531,18 @@ public static boolean isRailBlock(Material material) { || material == Material.POWERED_RAIL; } + /** + * Test whether the given material is a piston block, not including + * the "technical blocks" such as the piston extension block. + * + * @param material the material + * @return true if a piston block + */ + public static boolean isPistonBlock(Material material) { + return material == Material.PISTON_BASE + || material == Material.PISTON_STICKY_BASE; + } + /** * Test whether the given material is a Minecart. *