From f496d795fb0a8b012f860881122f9d25b7a14d5a Mon Sep 17 00:00:00 2001 From: nossr50 Date: Mon, 21 Sep 2020 21:23:10 -0700 Subject: [PATCH] Always track blocks in BlockMultiPlaceEvent --- .../nossr50/listeners/BlockListener.java | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/listeners/BlockListener.java b/src/main/java/com/gmail/nossr50/listeners/BlockListener.java index e2a19af43..a32ea2c24 100644 --- a/src/main/java/com/gmail/nossr50/listeners/BlockListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/BlockListener.java @@ -246,16 +246,6 @@ public class BlockListener implements Listener { */ @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void onBlockMultiPlace(BlockMultiPlaceEvent event) { - /* WORLD BLACKLIST CHECK */ - if(WorldBlacklist.isWorldBlacklisted(event.getBlock().getWorld())) - return; - - Player player = event.getPlayer(); - - if (!UserManager.hasPlayerDataKey(player)) { - return; - } - for (BlockState replacedBlockState : event.getReplacedBlockStates()) { BlockState blockState = replacedBlockState.getBlock().getState(); @@ -265,6 +255,17 @@ public class BlockListener implements Listener { mcMMO.getPlaceStore().setTrue(blockState); } } + + /* WORLD BLACKLIST CHECK */ + if(WorldBlacklist.isWorldBlacklisted(event.getBlock().getWorld())) { + return; + } + + Player player = event.getPlayer(); + + if (!UserManager.hasPlayerDataKey(player)) { + return; + } } @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)