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:32 -06:00
parent 19178d2875
commit 96dafe4327
3 changed files with 10 additions and 0 deletions

View File

@ -58,6 +58,7 @@ permissions:
factions.autoclaim: true factions.autoclaim: true
factions.chat: true factions.chat: true
factions.claim: true factions.claim: true
factions.claim.radius: true
factions.deinvite: true factions.deinvite: true
factions.description: true factions.description: true
factions.disband: true factions.disband: true
@ -99,6 +100,8 @@ permissions:
description: enable admin chat spy mode description: enable admin chat spy mode
factions.claim: factions.claim:
description: claim land where you are standing description: claim land where you are standing
factions.claim.radius:
description: claim land in a large radius
factions.config: factions.config:
description: change a conf.json setting description: change a conf.json setting
factions.create: factions.create:

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

@ -16,6 +16,7 @@ public enum Permission
CHAT("chat"), CHAT("chat"),
CHATSPY("chatspy"), CHATSPY("chatspy"),
CLAIM("claim"), CLAIM("claim"),
CLAIM_RADIUS("claim.radius"),
CONFIG("config"), CONFIG("config"),
CREATE("create"), CREATE("create"),
DEINVITE("deinvite"), DEINVITE("deinvite"),