mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-01-18 08:25:27 +01:00
change chunk listener to monitor so we can ignore cancelled events
This commit is contained in:
parent
ad771fddc5
commit
90fe8ee882
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user