mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-03 18:43:43 +01:00 
			
		
		
		
	change chunk listener to monitor so we can ignore cancelled events
This commit is contained in:
		@@ -11,9 +11,10 @@ import java.util.Arrays;
 | 
			
		||||
 | 
			
		||||
public class ChunkListener implements Listener {
 | 
			
		||||
 | 
			
		||||
    @EventHandler(ignoreCancelled = true)
 | 
			
		||||
    @EventHandler(ignoreCancelled = true, priority = org.bukkit.event.EventPriority.MONITOR)
 | 
			
		||||
    public void onChunkUnload(ChunkUnloadEvent event) {
 | 
			
		||||
        final Chunk unloadingChunk = event.getChunk();
 | 
			
		||||
 | 
			
		||||
        Arrays.stream(unloadingChunk.getEntities())
 | 
			
		||||
                .filter(entity -> entity instanceof LivingEntity)
 | 
			
		||||
                .map(entity -> (LivingEntity) entity)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user