Skip to content

Commit

Permalink
change chunk listener to monitor so we can ignore cancelled events
Browse files Browse the repository at this point in the history
  • Loading branch information
nossr50 committed Jan 3, 2025
1 parent ad771fd commit 90fe8ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/com/gmail/nossr50/listeners/ChunkListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@

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)
Expand Down

0 comments on commit 90fe8ee

Please sign in to comment.