Skip to content

Commit

Permalink
Fixes NPE when interacting with air (#4089)
Browse files Browse the repository at this point in the history
  • Loading branch information
WalshyDev authored Jan 13, 2024
1 parent a78cba0 commit 86533a8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void onRightClick(PlayerInteractEvent e) {

// Fixes #4087 - Prevents players from interacting with a block that is about to be deleted
// We especially don't want to open inventories as that can cause duplication
if (Slimefun.getTickerTask().isDeletedSoon(e.getClickedBlock().getLocation())) {
if (e.getClickedBlock() != null && Slimefun.getTickerTask().isDeletedSoon(e.getClickedBlock().getLocation())) {
e.setCancelled(true);
return;
}
Expand Down

0 comments on commit 86533a8

Please sign in to comment.