Prevent null island worlds from blocking purging. #2500

This commit is contained in:
tastybento 2024-09-13 07:53:22 -07:00
parent 6896a4579c
commit 8ba3f034f7

View File

@ -133,6 +133,7 @@ public class AdminPurgeCommand extends CompositeCommand implements Listener {
// Process islands in one pass, logging and adding to the set if applicable // Process islands in one pass, logging and adding to the set if applicable
getPlugin().getIslands().getIslands().stream() getPlugin().getIslands().getIslands().stream()
.filter(i -> !i.isSpawn()).filter(i -> !i.getPurgeProtected()) .filter(i -> !i.isSpawn()).filter(i -> !i.getPurgeProtected())
.filter(i -> i.getWorld() != null) // to handle currently unloaded world islands
.filter(i -> i.getWorld().equals(this.getWorld())).filter(Island::isOwned).filter( .filter(i -> i.getWorld().equals(this.getWorld())).filter(Island::isOwned).filter(
i -> i.getMemberSet().stream() i -> i.getMemberSet().stream()
.allMatch(member -> (currentTimeMillis .allMatch(member -> (currentTimeMillis