mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-25 02:27:42 +01:00
Add Materials.isPistonBlock().
This commit is contained in:
parent
f6f94571ea
commit
711fe7ad2f
@ -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.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user