Skip to content

Commit

Permalink
Fix admin register command to handle worlds correctly
Browse files Browse the repository at this point in the history
The register command was failing if a player had more that one island,
even if the island was in a different game mode.
  • Loading branch information
tastybento committed Dec 19, 2023
1 parent 1ef55a2 commit f6e26aa
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,8 @@ public boolean hasIsland(@NonNull World world, @NonNull UUID uuid) {
if (!islandsByUUID.containsKey(uuid)) {
return false;
}
return this.islandsByUUID.get(uuid).stream().anyMatch(i -> uuid.equals(i.getOwner()));
return this.islandsByUUID.get(uuid).stream().filter(i -> world.equals(i.getWorld()))
.anyMatch(i -> uuid.equals(i.getOwner()));
}

/**
Expand Down

0 comments on commit f6e26aa

Please sign in to comment.