From 4e6c12d9954c24b5f8e61e6e4e9df0558c80e717 Mon Sep 17 00:00:00 2001 From: Brettflan Date: Tue, 29 Jan 2013 19:21:33 -0600 Subject: [PATCH] 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. --- plugin.yml | 2 ++ src/com/massivecraft/factions/cmd/CmdClaim.java | 6 ++++++ src/com/massivecraft/factions/struct/Permission.java | 1 + 3 files changed, 9 insertions(+) diff --git a/plugin.yml b/plugin.yml index 9e5ae815..eae51e40 100644 --- a/plugin.yml +++ b/plugin.yml @@ -21,6 +21,7 @@ permissions: factions.cape.set: {description: set faction cape} factions.cape.remove: {description: remove faction cape} 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.create: {description: create a new faction} factions.deinvite: {description: remove a pending invitation} @@ -130,6 +131,7 @@ permissions: factions.cape: true factions.cape.*: true factions.claim: true + factions.claim.radius: true factions.deinvite: true factions.demote: true factions.description: true diff --git a/src/com/massivecraft/factions/cmd/CmdClaim.java b/src/com/massivecraft/factions/cmd/CmdClaim.java index dbc0b525..02dbc6ac 100644 --- a/src/com/massivecraft/factions/cmd/CmdClaim.java +++ b/src/com/massivecraft/factions/cmd/CmdClaim.java @@ -49,6 +49,12 @@ public class CmdClaim extends FCommand else { // radius claim + if (! Permission.CLAIM_RADIUS.has(sender, false)) + { + msg("You do not have permission to claim in a radius."); + return; + } + new SpiralTask(new FLocation(me), radius) { private int failCount = 0; diff --git a/src/com/massivecraft/factions/struct/Permission.java b/src/com/massivecraft/factions/struct/Permission.java index cb824215..25a5c883 100644 --- a/src/com/massivecraft/factions/struct/Permission.java +++ b/src/com/massivecraft/factions/struct/Permission.java @@ -15,6 +15,7 @@ public enum Permission CAPE_SET("cape.set"), CAPE_REMOVE("cape.remove"), CLAIM("claim"), + CLAIM_RADIUS("claim.radius"), CONFIG("config"), CREATE("create"), DEINVITE("deinvite"),