mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +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();
|
Block block = event.getClickedBlock();
|
||||||
BlockState blockState = block.getState();
|
BlockState blockState = null;
|
||||||
|
|
||||||
|
if (block != null) {
|
||||||
|
blockState = block.getState();
|
||||||
|
}
|
||||||
|
|
||||||
ItemStack heldItem = player.getItemInHand();
|
ItemStack heldItem = player.getItemInHand();
|
||||||
|
|
||||||
switch (event.getAction()) {
|
switch (event.getAction()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user