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:
tastybento 2023-11-19 12:38:54 -08:00
parent defb1c7a6e
commit 1cf7ccbb99
1 changed files with 1854 additions and 1854 deletions

View File

@ -1609,9 +1609,9 @@ public class IslandsManager {
* @param playerUUID - player's UUID
* @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()
.anyMatch(island -> island.getMembers().containsKey(playerUUID));
.anyMatch(island -> island.getMemberSet().size() > 1 && island.getMemberSet().contains(playerUUID));
}
/**