mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Fix for NPE when right/left clicking air.
This commit is contained in:
parent
9282b7bd15
commit
e556b707c9
@ -327,7 +327,12 @@ public class PlayerListener implements Listener {
|
||||
}
|
||||
|
||||
Block block = event.getClickedBlock();
|
||||
BlockState blockState = block.getState();
|
||||
BlockState blockState = null;
|
||||
|
||||
if (block != null) {
|
||||
blockState = block.getState();
|
||||
}
|
||||
|
||||
ItemStack heldItem = player.getItemInHand();
|
||||
|
||||
switch (event.getAction()) {
|
||||
|
Loading…
Reference in New Issue
Block a user