mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2025-02-05 14:21:36 +01:00
Fastest return first.
This commit is contained in:
parent
5c3f79c09d
commit
28a28b2e54
@ -63,12 +63,16 @@ public class BlockInteractListener extends CheckListener {
|
|||||||
*/
|
*/
|
||||||
final Player player = event.getPlayer();
|
final Player player = event.getPlayer();
|
||||||
|
|
||||||
if (event.getClickedBlock() == null || event.getAction() != Action.LEFT_CLICK_BLOCK
|
if (event.getAction() != Action.LEFT_CLICK_BLOCK && event.getAction() != Action.RIGHT_CLICK_BLOCK){
|
||||||
&& event.getAction() != Action.RIGHT_CLICK_BLOCK)
|
return;
|
||||||
return;
|
}
|
||||||
|
|
||||||
final Block block = event.getClickedBlock();
|
final Block block = event.getClickedBlock();
|
||||||
|
|
||||||
|
if (block == null){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
boolean cancelled = false;
|
boolean cancelled = false;
|
||||||
|
|
||||||
// First the reach check.
|
// First the reach check.
|
||||||
|
Loading…
Reference in New Issue
Block a user