Skip to content

Commit

Permalink
Fix /rsc in admin claims (#300)
Browse files Browse the repository at this point in the history
* Fix restrictsubclaim in admin claims

* Allow players with /ignoreclaims on to toggle restrictsubclaim flag
  • Loading branch information
jacob1 authored and RoboMWM committed Jul 25, 2018
1 parent f84ff64 commit ad07915
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -1718,7 +1718,10 @@ else if (cmd.getName().equalsIgnoreCase("restrictsubclaim") && player != null)
return true;
}

if(!player.getUniqueId().equals(claim.parent.ownerID))
// If player has /ignoreclaims on, continue
// If admin claim, fail if this user is not an admin
// If not an admin claim, fail if this user is not the owner
if(!playerData.ignoreClaims && (claim.isAdminClaim() ? !player.hasPermission("griefprevention.adminclaims") : !player.getUniqueId().equals(claim.parent.ownerID)))
{
GriefPrevention.sendMessage(player, TextMode.Err, Messages.OnlyOwnersModifyClaims, claim.getOwnerName());
return true;
Expand Down

0 comments on commit ad07915

Please sign in to comment.