1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00

Fixes NPE when interacting with air (#4089)

This commit is contained in:
Daniel Walsh 2024-01-13 16:37:57 +00:00 committed by GitHub
parent a78cba0711
commit 86533a8ec9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,7 +59,7 @@ public class SlimefunItemInteractListener implements Listener {
// 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;
}