From 96dafe4327b67299549b5eb38e97db9ed107415b Mon Sep 17 00:00:00 2001 From: Brettflan Date: Tue, 29 Jan 2013 19:21:32 -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 | 3 +++ src/com/massivecraft/factions/cmd/CmdClaim.java | 6 ++++++ src/com/massivecraft/factions/struct/Permission.java | 1 + 3 files changed, 10 insertions(+) diff --git a/plugin.yml b/plugin.yml index 89821cb8..061983da 100644 --- a/plugin.yml +++ b/plugin.yml @@ -58,6 +58,7 @@ permissions: factions.autoclaim: true factions.chat: true factions.claim: true + factions.claim.radius: true factions.deinvite: true factions.description: true factions.disband: true @@ -99,6 +100,8 @@ permissions: description: enable admin chat spy mode 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: diff --git a/src/com/massivecraft/factions/cmd/CmdClaim.java b/src/com/massivecraft/factions/cmd/CmdClaim.java index c87ed48e..0faa068a 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 4de1be5a..fef892c6 100644 --- a/src/com/massivecraft/factions/struct/Permission.java +++ b/src/com/massivecraft/factions/struct/Permission.java @@ -16,6 +16,7 @@ public enum Permission CHAT("chat"), CHATSPY("chatspy"), CLAIM("claim"), + CLAIM_RADIUS("claim.radius"), CONFIG("config"), CREATE("create"), DEINVITE("deinvite"),