Commits
24 24 | public void setCancelled(boolean cancelled) { |
25 25 | this.cancelled = cancelled; |
26 26 | } |
27 27 | |
28 28 | /** |
29 29 | * Returns true if the Piston in the event is sticky. |
30 30 | * |
31 31 | * @return stickiness of the piston |
32 32 | */ |
33 33 | public boolean isSticky() { |
34 - | return block.getType() == Material.PISTON_STICKY_BASE; |
34 + | return block.getType() == Material.PISTON_STICKY_BASE || block.getType() == Material.PISTON_MOVING_PIECE; |
35 35 | } |
36 36 | |
37 37 | /** |
38 38 | * Return the direction in which the piston will operate. |
39 39 | * |
40 40 | * @return direction of the piston |
41 41 | */ |
42 42 | public BlockFace getDirection() { |
43 43 | // Both are meh! |
44 44 | // return ((PistonBaseMaterial) block.getType().getNewData(block.getData())).getFacing(); |