mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-09 18:08:27 +01:00
Fix admin register command to handle worlds correctly
The register command was failing if a player had more that one island, even if the island was in a different game mode.
This commit is contained in:
parent
1ef55a2b1e
commit
f6e26aa5bd
@ -313,7 +313,8 @@ public class IslandCache {
|
||||
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()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user