Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
at develop 20 lines 585 B view raw
1package org.bukkit.event.block; 2 3import org.bukkit.Location; 4import org.bukkit.block.Block; 5 6public class BlockPistonRetractEvent extends BlockPistonEvent { 7 public BlockPistonRetractEvent(Block block) { 8 super(Type.BLOCK_PISTON_RETRACT, block); 9 } 10 11 /** 12 * Gets the location where the possible moving block might be if the retracting 13 * piston is sticky. 14 * 15 * @return The possible location of the possibly moving block. 16 */ 17 public Location getRetractLocation() { 18 return getBlock().getRelative(getDirection(), 2).getLocation(); 19 } 20}