mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-02-19 22:02:37 +01:00
Fix bug where players couldn't invite other players.
The IslandsManager#inTeam method was returning true even if the team was just 1 player.
This commit is contained in:
parent
defb1c7a6e
commit
1cf7ccbb99
@ -1609,9 +1609,9 @@ public class IslandsManager {
|
|||||||
* @param playerUUID - player's UUID
|
* @param playerUUID - player's UUID
|
||||||
* @return true if in team, false if not
|
* @return true if in team, false if not
|
||||||
*/
|
*/
|
||||||
public boolean inTeam(World world, UUID playerUUID) {
|
public boolean inTeam(World world, @NonNull UUID playerUUID) {
|
||||||
return this.islandCache.getIslands(world, playerUUID).stream()
|
return this.islandCache.getIslands(world, playerUUID).stream()
|
||||||
.anyMatch(island -> island.getMembers().containsKey(playerUUID));
|
.anyMatch(island -> island.getMemberSet().size() > 1 && island.getMemberSet().contains(playerUUID));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user