Skip to content

Commit

Permalink
0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiao-MoMi committed Mar 19, 2024
1 parent f781fbe commit ed6cd36
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
projectVersion = 0.8
projectVersion = 0.9
projectGroup=net.momirealms

#systemProp.socks.proxyHost=127.0.0.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,14 @@ public boolean canInteract(Player player, Location location) {

private boolean isIslandMember(Player player, Location location) {
return Optional.ofNullable(SkyBlockAPI.getIslandManager().getIslandAtLocation(location))
.map(island -> Optional.ofNullable(island.getRole(player))
.map(islandRole -> islandRole != IslandRole.VISITOR)
.orElse(false)
.map(island -> {
if (island.isCoopPlayer(player))
return true;
return Optional.ofNullable(island.getRole(player))
.map(islandRole -> islandRole != IslandRole.VISITOR)
.orElse(false);
}
)
.orElse(true);
}
}
}

0 comments on commit ed6cd36

Please sign in to comment.