From 8375a390cc19b5c455946bc3e3bff4cdaf148e04 Mon Sep 17 00:00:00 2001 From: Tobias Ottenweller Date: Thu, 17 May 2012 17:42:46 +0200 Subject: [PATCH] refactoring of block listener --- .../ancientgates/listeners/PluginBlockListener.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/org/mcteam/ancientgates/listeners/PluginBlockListener.java b/src/org/mcteam/ancientgates/listeners/PluginBlockListener.java index 8910c9b..63b5d95 100644 --- a/src/org/mcteam/ancientgates/listeners/PluginBlockListener.java +++ b/src/org/mcteam/ancientgates/listeners/PluginBlockListener.java @@ -30,17 +30,21 @@ public class PluginBlockListener implements Listener public boolean isBlockInPortal(Block block) { - if (block.getRelative(BlockFace.UP).getType() == Material.AIR) + if (block.getRelative(BlockFace.UP).getType() == Material.AIR) { return false; + } - if (block.getRelative(BlockFace.DOWN).getType() == Material.AIR) + if (block.getRelative(BlockFace.DOWN).getType() == Material.AIR) { return false; + } - if ( block.getRelative(BlockFace.NORTH).getType() != Material.AIR && block.getRelative(BlockFace.SOUTH).getType() != Material.AIR ) + if ( block.getRelative(BlockFace.NORTH).getType() != Material.AIR && block.getRelative(BlockFace.SOUTH).getType() != Material.AIR ) { return true; + } - if ( block.getRelative(BlockFace.WEST).getType() != Material.AIR && block.getRelative(BlockFace.EAST).getType() != Material.AIR ) + if ( block.getRelative(BlockFace.WEST).getType() != Material.AIR && block.getRelative(BlockFace.EAST).getType() != Material.AIR ) { return true; + } return false; }