mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-10-31 09:13:43 +01:00 
			
		
		
		
	Always track blocks in BlockMultiPlaceEvent
This commit is contained in:
		| @@ -246,16 +246,6 @@ public class BlockListener implements Listener { | |||||||
|      */ |      */ | ||||||
|     @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) |     @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) | ||||||
|     public void onBlockMultiPlace(BlockMultiPlaceEvent event) { |     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()) |         for (BlockState replacedBlockState : event.getReplacedBlockStates()) | ||||||
|         { |         { | ||||||
|             BlockState blockState = replacedBlockState.getBlock().getState(); |             BlockState blockState = replacedBlockState.getBlock().getState(); | ||||||
| @@ -265,6 +255,17 @@ public class BlockListener implements Listener { | |||||||
|                 mcMMO.getPlaceStore().setTrue(blockState); |                 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) |     @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 nossr50
					nossr50