Skip to content

Commit

Permalink
tweak playerHasPermission method to return true for operators
Browse files Browse the repository at this point in the history
  • Loading branch information
Draylar committed Oct 19, 2020
1 parent a65e589 commit 555cb24
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/main/java/draylar/goml/api/Claim.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
import net.minecraft.nbt.NbtHelper;
import net.minecraft.util.math.BlockPos;

import java.util.*;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;

/**
* Represents a claim on land with an origin {@link BlockPos}, owners, and other allowed players.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/draylar/goml/api/ClaimUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ public static boolean claimMatchesWith(Entry<ClaimBox, Claim> claim, PlayerEntit
* @return whether the checkPlayer can build/interact in the claim
*/
public static boolean playerHasPermission(Entry<ClaimBox, Claim> claim, PlayerEntity checkPlayer) {
return claim.getValue().getOwners().contains(checkPlayer.getUuid());
return claim.getValue().getOwners().contains(checkPlayer.getUuid()) || checkPlayer.hasPermissionLevel(3);
}
}

0 comments on commit 555cb24

Please sign in to comment.