Skip to content

Commit

Permalink
Fix BentoBoxHook for use with Multiverse
Browse files Browse the repository at this point in the history
  • Loading branch information
weaves7 committed Jun 20, 2020
1 parent ecc8b65 commit c8829d7
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,16 @@ public Boolean canBuild(Player player, Block block) {
User user = User.getInstance(player);
IslandsManager islandsManager = bentoBox.getIslands();
Optional<Island> island = islandsManager.getIslandAt(block.getLocation());
if (island.isPresent() && island.get().getMembers().containsKey(user.getUniqueId())) {
if (!island.isPresent()) {
return true;
}
if (island.get().getMembers().containsKey(user.getUniqueId())) {
//visitor:0 coop:200 trusted:400 member:500 sub-owner:900 owner:1000
return island.get().getMembers().get(user.getUniqueId()) >= 500; // visitor:0 coop:
}
return false;
else {
return false;
}
}

@Override
Expand Down

0 comments on commit c8829d7

Please sign in to comment.