New permission factions.claim.radius (granted to all players by default), which is now required in order to specify a radius with the claim command.

This commit is contained in:
Brettflan 2013-01-29 19:21:33 -06:00
parent 15024bf880
commit 4e6c12d995
3 changed files with 9 additions and 0 deletions

View File

@ -21,6 +21,7 @@ permissions:
factions.cape.set: {description: set faction cape} factions.cape.set: {description: set faction cape}
factions.cape.remove: {description: remove faction cape} factions.cape.remove: {description: remove faction cape}
factions.claim: {description: claim land where you are standing} factions.claim: {description: claim land where you are standing}
factions.claim.radius: {description: claim land in a large radius}
factions.config: {description: change a conf.json setting} factions.config: {description: change a conf.json setting}
factions.create: {description: create a new faction} factions.create: {description: create a new faction}
factions.deinvite: {description: remove a pending invitation} factions.deinvite: {description: remove a pending invitation}
@ -130,6 +131,7 @@ permissions:
factions.cape: true factions.cape: true
factions.cape.*: true factions.cape.*: true
factions.claim: true factions.claim: true
factions.claim.radius: true
factions.deinvite: true factions.deinvite: true
factions.demote: true factions.demote: true
factions.description: true factions.description: true

View File

@ -49,6 +49,12 @@ public class CmdClaim extends FCommand
else else
{ {
// radius claim // radius claim
if (! Permission.CLAIM_RADIUS.has(sender, false))
{
msg("<b>You do not have permission to claim in a radius.");
return;
}
new SpiralTask(new FLocation(me), radius) new SpiralTask(new FLocation(me), radius)
{ {
private int failCount = 0; private int failCount = 0;

View File

@ -15,6 +15,7 @@ public enum Permission
CAPE_SET("cape.set"), CAPE_SET("cape.set"),
CAPE_REMOVE("cape.remove"), CAPE_REMOVE("cape.remove"),
CLAIM("claim"), CLAIM("claim"),
CLAIM_RADIUS("claim.radius"),
CONFIG("config"), CONFIG("config"),
CREATE("create"), CREATE("create"),
DEINVITE("deinvite"), DEINVITE("deinvite"),