Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void checkHasClaim(Player player) throws CommandException {
- if (player.hasPermission("my.perm")) {
- return;
- }
- ClaimManager claimManager = Warps.inst().getGriefPrevention().getClaimManager(player.getWorld());
- Claim claim = claimManager.getClaimAt(new Location<>(player.getWorld(), player.getPosition()));
- if (!claim.isTrusted(player.getUniqueId())) {
- throw new CommandException(TextUtils.toPluginText(TextColors.RED, "no access to the region"));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement