From 9dfaf3ae507c9327dd40f5d61c8de1e9d3e18725 Mon Sep 17 00:00:00 2001 From: ASangarin Date: Tue, 22 Dec 2020 03:05:20 +0100 Subject: [PATCH] Fixed bug that allowed blocks to be broken when no block info was found --- src/main/java/net/Indyuce/mmocore/listener/BlockListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/Indyuce/mmocore/listener/BlockListener.java b/src/main/java/net/Indyuce/mmocore/listener/BlockListener.java index 62ad5a52..aa2d1261 100644 --- a/src/main/java/net/Indyuce/mmocore/listener/BlockListener.java +++ b/src/main/java/net/Indyuce/mmocore/listener/BlockListener.java @@ -49,7 +49,7 @@ public class BlockListener implements Listener { */ BlockInfo info = MMOCore.plugin.mineManager.getInfo(block); boolean temporaryBlock = MMOCore.plugin.mineManager.isTemporaryBlock(block); - if ((temporaryBlock && info == null) || !info.checkConditions(block)) { + if ((temporaryBlock && info == null) || (info != null && !info.checkConditions(block))) { event.setCancelled(true); return; }