Added BlockFlowEvent, fixed up BlockFromToEvent, cleaned up

BlockListener

By: durron597 <martin.jared@gmail.com>
This commit is contained in:
Bukkit/Spigot
2010-12-30 18:22:22 -05:00
parent 53b6d54100
commit ddd950ae40
5 changed files with 100 additions and 18 deletions

View File

@@ -23,4 +23,13 @@ public class BlockFromToEvent extends BlockEvent {
public BlockFace getFace() {
return face;
}
/**
* Convenience method for getting the faced block
*
* @return Block the faced block
*/
public Block getFacedBlock() {
return block.getRelative(face.getModX(), face.getModY(), face.getModZ());
}
}