Fastest return first.

This commit is contained in:
asofold 2013-02-17 14:32:29 +01:00
parent 5c3f79c09d
commit 28a28b2e54

View File

@ -63,11 +63,15 @@ public class BlockInteractListener extends CheckListener {
*/
final Player player = event.getPlayer();
if (event.getClickedBlock() == null || event.getAction() != Action.LEFT_CLICK_BLOCK
&& event.getAction() != Action.RIGHT_CLICK_BLOCK)
return;
if (event.getAction() != Action.LEFT_CLICK_BLOCK && event.getAction() != Action.RIGHT_CLICK_BLOCK){
return;
}
final Block block = event.getClickedBlock();
if (block == null){
return;
}
boolean cancelled = false;