Fixed bug that allowed blocks to be broken when no block info was found

This commit is contained in:
ASangarin 2020-12-22 03:05:20 +01:00
parent 6c82011a77
commit 9dfaf3ae50

View File

@ -49,7 +49,7 @@ public class BlockListener implements Listener {
*/ */
BlockInfo info = MMOCore.plugin.mineManager.getInfo(block); BlockInfo info = MMOCore.plugin.mineManager.getInfo(block);
boolean temporaryBlock = MMOCore.plugin.mineManager.isTemporaryBlock(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); event.setCancelled(true);
return; return;
} }