Renaming Permission --> Perm and moving to main package.
This commit is contained in:
		@@ -1,9 +1,8 @@
 | 
			
		||||
package com.massivecraft.factions.struct;
 | 
			
		||||
package com.massivecraft.factions;
 | 
			
		||||
 | 
			
		||||
import org.bukkit.command.CommandSender;
 | 
			
		||||
import com.massivecraft.factions.P;
 | 
			
		||||
 | 
			
		||||
public enum Permission
 | 
			
		||||
public enum Perm
 | 
			
		||||
{
 | 
			
		||||
	ACCESS("access"),
 | 
			
		||||
	ACCESS_ANY("access.any"),
 | 
			
		||||
@@ -67,7 +66,7 @@ public enum Permission
 | 
			
		||||
	
 | 
			
		||||
	public final String node;
 | 
			
		||||
	
 | 
			
		||||
	Permission(final String node)
 | 
			
		||||
	Perm(final String node)
 | 
			
		||||
	{
 | 
			
		||||
		this.node = "factions."+node;
 | 
			
		||||
	}
 | 
			
		||||
@@ -4,9 +4,9 @@ import com.massivecraft.factions.Board;
 | 
			
		||||
import com.massivecraft.factions.Faction;
 | 
			
		||||
import com.massivecraft.factions.FLocation;
 | 
			
		||||
import com.massivecraft.factions.FPlayer;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.integration.SpoutFeatures;
 | 
			
		||||
import com.massivecraft.factions.struct.FPerm;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.struct.TerritoryAccess;
 | 
			
		||||
import com.massivecraft.factions.zcore.util.TextUtil;
 | 
			
		||||
 | 
			
		||||
@@ -40,11 +40,11 @@ public class CmdAccess extends FCommand
 | 
			
		||||
 | 
			
		||||
		TerritoryAccess territory = Board.getTerritoryAccessAt(loc);
 | 
			
		||||
		Faction locFaction = territory.getHostFaction();
 | 
			
		||||
		boolean accessAny = Permission.ACCESS_ANY.has(sender, false);
 | 
			
		||||
		boolean accessAny = Perm.ACCESS_ANY.has(sender, false);
 | 
			
		||||
 | 
			
		||||
		if (type.isEmpty() || type.equals("view"))
 | 
			
		||||
		{
 | 
			
		||||
			if ( ! accessAny && ! Permission.ACCESS_VIEW.has(sender, true)) return;
 | 
			
		||||
			if ( ! accessAny && ! Perm.ACCESS_VIEW.has(sender, true)) return;
 | 
			
		||||
			if ( ! accessAny && ! territory.doesHostFactionMatch(fme))
 | 
			
		||||
			{
 | 
			
		||||
				msg("<b>This territory isn't controlled by your faction, so you can't view the access list.");
 | 
			
		||||
@@ -54,7 +54,7 @@ public class CmdAccess extends FCommand
 | 
			
		||||
			return;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if ( ! accessAny && ! Permission.ACCESS.has(sender, true)) return;
 | 
			
		||||
		if ( ! accessAny && ! Perm.ACCESS.has(sender, true)) return;
 | 
			
		||||
		if ( ! accessAny && ! FPerm.ACCESS.has(fme, locFaction, true)) return;
 | 
			
		||||
 | 
			
		||||
		boolean doPlayer = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
package com.massivecraft.factions.cmd;
 | 
			
		||||
 | 
			
		||||
import com.massivecraft.factions.P;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
 | 
			
		||||
public class CmdAdmin extends FCommand
 | 
			
		||||
{
 | 
			
		||||
@@ -13,7 +13,7 @@ public class CmdAdmin extends FCommand
 | 
			
		||||
		//this.requiredArgs.add("");
 | 
			
		||||
		this.optionalArgs.put("on/off", "flip");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.ADMIN.node;
 | 
			
		||||
		this.permission = Perm.ADMIN.node;
 | 
			
		||||
		this.disableOnLock = false;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
package com.massivecraft.factions.cmd;
 | 
			
		||||
 | 
			
		||||
import com.massivecraft.factions.Faction;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.struct.FPerm;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
 | 
			
		||||
public class CmdAutoClaim extends FCommand
 | 
			
		||||
{
 | 
			
		||||
@@ -14,7 +14,7 @@ public class CmdAutoClaim extends FCommand
 | 
			
		||||
		//this.requiredArgs.add("");
 | 
			
		||||
		this.optionalArgs.put("faction", "your");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.AUTOCLAIM.node;
 | 
			
		||||
		this.permission = Perm.AUTOCLAIM.node;
 | 
			
		||||
		this.disableOnLock = true;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
package com.massivecraft.factions.cmd;
 | 
			
		||||
 | 
			
		||||
import com.massivecraft.factions.P;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
 | 
			
		||||
public class CmdCape extends FCommand
 | 
			
		||||
{
 | 
			
		||||
@@ -14,7 +14,7 @@ public class CmdCape extends FCommand
 | 
			
		||||
		super();
 | 
			
		||||
		this.aliases.add("cape");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.CAPE.node;
 | 
			
		||||
		this.permission = Perm.CAPE.node;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = false;
 | 
			
		||||
		senderMustBeMember = false;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,13 +1,13 @@
 | 
			
		||||
package com.massivecraft.factions.cmd;
 | 
			
		||||
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
 | 
			
		||||
public class CmdCapeGet extends CapeCommand
 | 
			
		||||
{
 | 
			
		||||
	public CmdCapeGet()
 | 
			
		||||
	{
 | 
			
		||||
		this.aliases.add("get");
 | 
			
		||||
		this.permission = Permission.CAPE_GET.node;
 | 
			
		||||
		this.permission = Perm.CAPE_GET.node;
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	@Override
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
package com.massivecraft.factions.cmd;
 | 
			
		||||
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.integration.SpoutFeatures;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.util.RelationUtil;
 | 
			
		||||
 | 
			
		||||
public class CmdCapeRemove extends CapeCommand
 | 
			
		||||
@@ -14,7 +14,7 @@ public class CmdCapeRemove extends CapeCommand
 | 
			
		||||
		this.aliases.add("remove");
 | 
			
		||||
		this.aliases.add("del");
 | 
			
		||||
		this.aliases.add("delete");
 | 
			
		||||
		this.permission = Permission.CAPE_REMOVE.node;
 | 
			
		||||
		this.permission = Perm.CAPE_REMOVE.node;
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	@Override
 | 
			
		||||
 
 | 
			
		||||
@@ -2,8 +2,8 @@ package com.massivecraft.factions.cmd;
 | 
			
		||||
 | 
			
		||||
import java.net.URL;
 | 
			
		||||
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.integration.SpoutFeatures;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.util.RelationUtil;
 | 
			
		||||
 | 
			
		||||
public class CmdCapeSet extends CapeCommand
 | 
			
		||||
@@ -13,7 +13,7 @@ public class CmdCapeSet extends CapeCommand
 | 
			
		||||
	{
 | 
			
		||||
		this.aliases.add("set");
 | 
			
		||||
		this.requiredArgs.add("url");
 | 
			
		||||
		this.permission = Permission.CAPE_SET.node;
 | 
			
		||||
		this.permission = Perm.CAPE_SET.node;
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	@Override
 | 
			
		||||
 
 | 
			
		||||
@@ -3,7 +3,7 @@ package com.massivecraft.factions.cmd;
 | 
			
		||||
import com.massivecraft.factions.Conf;
 | 
			
		||||
import com.massivecraft.factions.FLocation;
 | 
			
		||||
import com.massivecraft.factions.Faction;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.util.SpiralTask;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -19,7 +19,7 @@ public class CmdClaim extends FCommand
 | 
			
		||||
		this.optionalArgs.put("faction", "your");
 | 
			
		||||
		this.optionalArgs.put("radius", "1");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.CLAIM.node;
 | 
			
		||||
		this.permission = Perm.CLAIM.node;
 | 
			
		||||
		this.disableOnLock = true;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = true;
 | 
			
		||||
@@ -49,7 +49,7 @@ public class CmdClaim extends FCommand
 | 
			
		||||
		else
 | 
			
		||||
		{
 | 
			
		||||
			// radius claim
 | 
			
		||||
			if (! Permission.CLAIM_RADIUS.has(sender, false))
 | 
			
		||||
			if (! Perm.CLAIM_RADIUS.has(sender, false))
 | 
			
		||||
			{
 | 
			
		||||
				msg("<b>You do not have permission to claim in a radius.");
 | 
			
		||||
				return;
 | 
			
		||||
 
 | 
			
		||||
@@ -14,10 +14,10 @@ import org.bukkit.entity.Player;
 | 
			
		||||
 | 
			
		||||
import com.massivecraft.factions.Conf;
 | 
			
		||||
import com.massivecraft.factions.P;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.integration.SpoutFeatures;
 | 
			
		||||
import com.massivecraft.factions.struct.FFlag;
 | 
			
		||||
import com.massivecraft.factions.struct.FPerm;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.struct.Rel;
 | 
			
		||||
 | 
			
		||||
public class CmdConfig extends FCommand
 | 
			
		||||
@@ -33,7 +33,7 @@ public class CmdConfig extends FCommand
 | 
			
		||||
		this.requiredArgs.add("value");
 | 
			
		||||
		this.errorOnToManyArgs = false;
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.CONFIG.node;
 | 
			
		||||
		this.permission = Perm.CONFIG.node;
 | 
			
		||||
		this.disableOnLock = true;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = false;
 | 
			
		||||
 
 | 
			
		||||
@@ -10,9 +10,9 @@ import com.massivecraft.factions.FPlayers;
 | 
			
		||||
import com.massivecraft.factions.Faction;
 | 
			
		||||
import com.massivecraft.factions.Factions;
 | 
			
		||||
import com.massivecraft.factions.P;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.event.FPlayerJoinEvent;
 | 
			
		||||
import com.massivecraft.factions.event.FactionCreateEvent;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.struct.Rel;
 | 
			
		||||
 | 
			
		||||
public class CmdCreate extends FCommand
 | 
			
		||||
@@ -25,7 +25,7 @@ public class CmdCreate extends FCommand
 | 
			
		||||
		this.requiredArgs.add("faction tag");
 | 
			
		||||
		//this.optionalArgs.put("", "");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.CREATE.node;
 | 
			
		||||
		this.permission = Perm.CREATE.node;
 | 
			
		||||
		this.disableOnLock = true;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
package com.massivecraft.factions.cmd;
 | 
			
		||||
 | 
			
		||||
import com.massivecraft.factions.FPlayer;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
 | 
			
		||||
public class CmdDeinvite extends FCommand
 | 
			
		||||
{
 | 
			
		||||
@@ -15,7 +15,7 @@ public class CmdDeinvite extends FCommand
 | 
			
		||||
		this.requiredArgs.add("player");
 | 
			
		||||
		//this.optionalArgs.put("", "");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.DEINVITE.node;
 | 
			
		||||
		this.permission = Perm.DEINVITE.node;
 | 
			
		||||
		this.disableOnLock = true;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
package com.massivecraft.factions.cmd;
 | 
			
		||||
 | 
			
		||||
import com.massivecraft.factions.FPlayer;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.struct.Rel;
 | 
			
		||||
 | 
			
		||||
public class CmdDemote extends FCommand
 | 
			
		||||
@@ -15,7 +15,7 @@ public class CmdDemote extends FCommand
 | 
			
		||||
		this.requiredArgs.add("player name");
 | 
			
		||||
		//this.optionalArgs.put("", "");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.DEMOTE.node;
 | 
			
		||||
		this.permission = Perm.DEMOTE.node;
 | 
			
		||||
		this.disableOnLock = true;
 | 
			
		||||
		
 | 
			
		||||
		//To demote someone from member -> recruit you must be an officer.
 | 
			
		||||
 
 | 
			
		||||
@@ -3,7 +3,7 @@ package com.massivecraft.factions.cmd;
 | 
			
		||||
import com.massivecraft.factions.Conf;
 | 
			
		||||
import com.massivecraft.factions.FPlayer;
 | 
			
		||||
import com.massivecraft.factions.FPlayers;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.zcore.util.TextUtil;
 | 
			
		||||
 | 
			
		||||
public class CmdDescription extends FCommand
 | 
			
		||||
@@ -17,7 +17,7 @@ public class CmdDescription extends FCommand
 | 
			
		||||
		this.errorOnToManyArgs = false;
 | 
			
		||||
		//this.optionalArgs
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.DESCRIPTION.node;
 | 
			
		||||
		this.permission = Perm.DESCRIPTION.node;
 | 
			
		||||
		this.disableOnLock = true;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -10,10 +10,10 @@ import com.massivecraft.factions.FPlayers;
 | 
			
		||||
import com.massivecraft.factions.Faction;
 | 
			
		||||
import com.massivecraft.factions.P;
 | 
			
		||||
import com.massivecraft.factions.FPlayer;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.integration.SpoutFeatures;
 | 
			
		||||
import com.massivecraft.factions.struct.FFlag;
 | 
			
		||||
import com.massivecraft.factions.struct.FPerm;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
 | 
			
		||||
public class CmdDisband extends FCommand
 | 
			
		||||
{
 | 
			
		||||
@@ -25,7 +25,7 @@ public class CmdDisband extends FCommand
 | 
			
		||||
		//this.requiredArgs.add("");
 | 
			
		||||
		this.optionalArgs.put("faction", "your");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.DISBAND.node;
 | 
			
		||||
		this.permission = Perm.DISBAND.node;
 | 
			
		||||
		this.disableOnLock = true;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = false;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
package com.massivecraft.factions.cmd;
 | 
			
		||||
 | 
			
		||||
import com.massivecraft.factions.Faction;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.struct.FFlag;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
 | 
			
		||||
public class CmdFlag extends FCommand
 | 
			
		||||
{
 | 
			
		||||
@@ -17,7 +17,7 @@ public class CmdFlag extends FCommand
 | 
			
		||||
		this.optionalArgs.put("flag", "all");
 | 
			
		||||
		this.optionalArgs.put("yes/no", "read");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.FLAG.node;
 | 
			
		||||
		this.permission = Perm.FLAG.node;
 | 
			
		||||
		this.disableOnLock = true;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = false;
 | 
			
		||||
@@ -59,7 +59,7 @@ public class CmdFlag extends FCommand
 | 
			
		||||
		if (targetValue == null) return;
 | 
			
		||||
 | 
			
		||||
		// Do the sender have the right to change flags?
 | 
			
		||||
		if ( ! Permission.FLAG_SET.has(sender, true)) return;
 | 
			
		||||
		if ( ! Perm.FLAG_SET.has(sender, true)) return;
 | 
			
		||||
		
 | 
			
		||||
		// Do the change
 | 
			
		||||
		msg(p.txt.titleize("Flag for " + faction.describeTo(fme, true)));
 | 
			
		||||
 
 | 
			
		||||
@@ -4,8 +4,8 @@ import java.util.ArrayList;
 | 
			
		||||
 | 
			
		||||
import com.massivecraft.factions.Conf;
 | 
			
		||||
import com.massivecraft.factions.P;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.integration.Econ;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
public class CmdHelp extends FCommand
 | 
			
		||||
@@ -21,7 +21,7 @@ public class CmdHelp extends FCommand
 | 
			
		||||
		//this.requiredArgs.add("");
 | 
			
		||||
		this.optionalArgs.put("page", "1");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.HELP.node;
 | 
			
		||||
		this.permission = Perm.HELP.node;
 | 
			
		||||
		this.disableOnLock = false;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = false;
 | 
			
		||||
 
 | 
			
		||||
@@ -13,9 +13,9 @@ import com.massivecraft.factions.FLocation;
 | 
			
		||||
import com.massivecraft.factions.FPlayer;
 | 
			
		||||
import com.massivecraft.factions.FPlayers;
 | 
			
		||||
import com.massivecraft.factions.Faction;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.integration.EssentialsFeatures;
 | 
			
		||||
import com.massivecraft.factions.struct.FFlag;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.struct.Rel;
 | 
			
		||||
import com.massivecraft.factions.zcore.util.SmokeUtil;
 | 
			
		||||
 | 
			
		||||
@@ -31,7 +31,7 @@ public class CmdHome extends FCommand
 | 
			
		||||
		//this.requiredArgs.add("");
 | 
			
		||||
		//this.optionalArgs.put("", "");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.HOME.node;
 | 
			
		||||
		this.permission = Perm.HOME.node;
 | 
			
		||||
		this.disableOnLock = false;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -2,8 +2,8 @@ package com.massivecraft.factions.cmd;
 | 
			
		||||
 | 
			
		||||
import com.massivecraft.factions.Conf;
 | 
			
		||||
import com.massivecraft.factions.FPlayer;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.struct.FPerm;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
 | 
			
		||||
public class CmdInvite extends FCommand
 | 
			
		||||
{
 | 
			
		||||
@@ -16,7 +16,7 @@ public class CmdInvite extends FCommand
 | 
			
		||||
		this.requiredArgs.add("player");
 | 
			
		||||
		//this.optionalArgs.put("", "");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.INVITE.node;
 | 
			
		||||
		this.permission = Perm.INVITE.node;
 | 
			
		||||
		this.disableOnLock = true;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -7,8 +7,8 @@ import com.massivecraft.factions.FPlayer;
 | 
			
		||||
import com.massivecraft.factions.FPlayers;
 | 
			
		||||
import com.massivecraft.factions.Faction;
 | 
			
		||||
import com.massivecraft.factions.P;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.event.FPlayerJoinEvent;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
 | 
			
		||||
public class CmdJoin extends FCommand
 | 
			
		||||
{
 | 
			
		||||
@@ -20,7 +20,7 @@ public class CmdJoin extends FCommand
 | 
			
		||||
		this.requiredArgs.add("faction");
 | 
			
		||||
		this.optionalArgs.put("player", "you");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.JOIN.node;
 | 
			
		||||
		this.permission = Perm.JOIN.node;
 | 
			
		||||
		this.disableOnLock = true;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = true;
 | 
			
		||||
@@ -38,7 +38,7 @@ public class CmdJoin extends FCommand
 | 
			
		||||
		FPlayer fplayer = this.argAsBestFPlayerMatch(1, fme, false);
 | 
			
		||||
		boolean samePlayer = fplayer == fme;
 | 
			
		||||
 | 
			
		||||
		if (!samePlayer  && ! Permission.JOIN_OTHERS.has(sender, false))
 | 
			
		||||
		if (!samePlayer  && ! Perm.JOIN_OTHERS.has(sender, false))
 | 
			
		||||
		{
 | 
			
		||||
			msg("<b>You do not have permission to move other players into a faction.");
 | 
			
		||||
			return;
 | 
			
		||||
@@ -68,7 +68,7 @@ public class CmdJoin extends FCommand
 | 
			
		||||
			return;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if( ! (faction.getOpen() || faction.isInvited(fplayer) || fme.hasAdminMode() || Permission.JOIN_ANY.has(sender, false)))
 | 
			
		||||
		if( ! (faction.getOpen() || faction.isInvited(fplayer) || fme.hasAdminMode() || Perm.JOIN_ANY.has(sender, false)))
 | 
			
		||||
		{
 | 
			
		||||
			msg("<i>This faction requires invitation.");
 | 
			
		||||
			if (samePlayer)
 | 
			
		||||
 
 | 
			
		||||
@@ -6,9 +6,9 @@ import com.massivecraft.factions.Conf;
 | 
			
		||||
import com.massivecraft.factions.FPlayer;
 | 
			
		||||
import com.massivecraft.factions.Faction;
 | 
			
		||||
import com.massivecraft.factions.P;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.event.FPlayerLeaveEvent;
 | 
			
		||||
import com.massivecraft.factions.struct.FPerm;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.struct.Rel;
 | 
			
		||||
 | 
			
		||||
public class CmdKick extends FCommand
 | 
			
		||||
@@ -22,7 +22,7 @@ public class CmdKick extends FCommand
 | 
			
		||||
		this.requiredArgs.add("player");
 | 
			
		||||
		//this.optionalArgs.put("", "");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.KICK.node;
 | 
			
		||||
		this.permission = Perm.KICK.node;
 | 
			
		||||
		this.disableOnLock = false;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -5,8 +5,8 @@ import org.bukkit.Bukkit;
 | 
			
		||||
import com.massivecraft.factions.FPlayer;
 | 
			
		||||
import com.massivecraft.factions.FPlayers;
 | 
			
		||||
import com.massivecraft.factions.Faction;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.event.FPlayerJoinEvent;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.struct.Rel;
 | 
			
		||||
import com.massivecraft.factions.util.RelationUtil;
 | 
			
		||||
 | 
			
		||||
@@ -20,7 +20,7 @@ public class CmdLeader extends FCommand
 | 
			
		||||
		this.requiredArgs.add("player");
 | 
			
		||||
		this.optionalArgs.put("faction", "your");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.LEADER.node;
 | 
			
		||||
		this.permission = Perm.LEADER.node;
 | 
			
		||||
		this.disableOnLock = true;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = false;
 | 
			
		||||
@@ -41,7 +41,7 @@ public class CmdLeader extends FCommand
 | 
			
		||||
		FPlayer targetFactionCurrentLeader = targetFaction.getFPlayerLeader();
 | 
			
		||||
		
 | 
			
		||||
		// We now have fplayer and the target faction
 | 
			
		||||
		if (this.senderIsConsole || fme.hasAdminMode() || Permission.LEADER_ANY.has(sender, false))
 | 
			
		||||
		if (this.senderIsConsole || fme.hasAdminMode() || Perm.LEADER_ANY.has(sender, false))
 | 
			
		||||
		{
 | 
			
		||||
			// Do whatever you wish
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
package com.massivecraft.factions.cmd;
 | 
			
		||||
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
 | 
			
		||||
public class CmdLeave extends FCommand {
 | 
			
		||||
	
 | 
			
		||||
@@ -12,7 +12,7 @@ public class CmdLeave extends FCommand {
 | 
			
		||||
		//this.requiredArgs.add("");
 | 
			
		||||
		//this.optionalArgs.put("", "");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.LEAVE.node;
 | 
			
		||||
		this.permission = Perm.LEAVE.node;
 | 
			
		||||
		this.disableOnLock = true;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,7 @@ import java.util.Comparator;
 | 
			
		||||
import com.massivecraft.factions.Conf;
 | 
			
		||||
import com.massivecraft.factions.Faction;
 | 
			
		||||
import com.massivecraft.factions.Factions;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
public class CmdList extends FCommand
 | 
			
		||||
@@ -22,7 +22,7 @@ public class CmdList extends FCommand
 | 
			
		||||
		//this.requiredArgs.add("");
 | 
			
		||||
		this.optionalArgs.put("page", "1");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.LIST.node;
 | 
			
		||||
		this.permission = Perm.LIST.node;
 | 
			
		||||
		this.disableOnLock = false;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = false;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
package com.massivecraft.factions.cmd;
 | 
			
		||||
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
 | 
			
		||||
public class CmdLock extends FCommand {
 | 
			
		||||
	
 | 
			
		||||
@@ -19,7 +19,7 @@ public class CmdLock extends FCommand {
 | 
			
		||||
		//this.requiredArgs.add("");
 | 
			
		||||
		this.optionalArgs.put("on/off", "flip");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.LOCK.node;
 | 
			
		||||
		this.permission = Perm.LOCK.node;
 | 
			
		||||
		this.disableOnLock = false;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = false;
 | 
			
		||||
 
 | 
			
		||||
@@ -3,7 +3,7 @@ package com.massivecraft.factions.cmd;
 | 
			
		||||
import com.massivecraft.factions.Board;
 | 
			
		||||
import com.massivecraft.factions.Conf;
 | 
			
		||||
import com.massivecraft.factions.FLocation;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
public class CmdMap extends FCommand
 | 
			
		||||
@@ -16,7 +16,7 @@ public class CmdMap extends FCommand
 | 
			
		||||
		//this.requiredArgs.add("");
 | 
			
		||||
		this.optionalArgs.put("on/off", "once");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.MAP.node;
 | 
			
		||||
		this.permission = Perm.MAP.node;
 | 
			
		||||
		this.disableOnLock = false;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
package com.massivecraft.factions.cmd;
 | 
			
		||||
 | 
			
		||||
import com.massivecraft.factions.integration.Econ;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.Faction;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
 | 
			
		||||
public class CmdMoneyBalance extends FCommand
 | 
			
		||||
{
 | 
			
		||||
@@ -15,7 +15,7 @@ public class CmdMoneyBalance extends FCommand
 | 
			
		||||
		//this.requiredArgs.add("");
 | 
			
		||||
		this.optionalArgs.put("faction", "your");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.MONEY_BALANCE.node;
 | 
			
		||||
		this.permission = Perm.MONEY_BALANCE.node;
 | 
			
		||||
		this.setHelpShort("show faction balance");
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = false;
 | 
			
		||||
@@ -34,7 +34,7 @@ public class CmdMoneyBalance extends FCommand
 | 
			
		||||
		}
 | 
			
		||||
			
 | 
			
		||||
		if (faction == null) return;
 | 
			
		||||
		if (faction != myFaction && ! Permission.MONEY_BALANCE_ANY.has(sender, true)) return;
 | 
			
		||||
		if (faction != myFaction && ! Perm.MONEY_BALANCE_ANY.has(sender, true)) return;
 | 
			
		||||
		
 | 
			
		||||
		Econ.sendBalanceInfo(fme, faction);
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -2,9 +2,9 @@ package com.massivecraft.factions.cmd;
 | 
			
		||||
 | 
			
		||||
import com.massivecraft.factions.Conf;
 | 
			
		||||
import com.massivecraft.factions.P;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.iface.EconomyParticipator;
 | 
			
		||||
import com.massivecraft.factions.integration.Econ;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
 | 
			
		||||
import org.bukkit.ChatColor;
 | 
			
		||||
 | 
			
		||||
@@ -21,7 +21,7 @@ public class CmdMoneyDeposit extends FCommand
 | 
			
		||||
		this.requiredArgs.add("amount");
 | 
			
		||||
		this.optionalArgs.put("faction", "your");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.MONEY_DEPOSIT.node;
 | 
			
		||||
		this.permission = Perm.MONEY_DEPOSIT.node;
 | 
			
		||||
		this.setHelpShort("deposit money");
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
package com.massivecraft.factions.cmd;
 | 
			
		||||
 | 
			
		||||
import com.massivecraft.factions.Conf;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.iface.EconomyParticipator;
 | 
			
		||||
import com.massivecraft.factions.P;
 | 
			
		||||
import com.massivecraft.factions.integration.Econ;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
 | 
			
		||||
import org.bukkit.ChatColor;
 | 
			
		||||
 | 
			
		||||
@@ -21,7 +21,7 @@ public class CmdMoneyTransferFf extends FCommand
 | 
			
		||||
		
 | 
			
		||||
		//this.optionalArgs.put("", "");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.MONEY_F2F.node;
 | 
			
		||||
		this.permission = Perm.MONEY_F2F.node;
 | 
			
		||||
		this.setHelpShort("transfer f -> f");
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = false;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
package com.massivecraft.factions.cmd;
 | 
			
		||||
 | 
			
		||||
import com.massivecraft.factions.Conf;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.iface.EconomyParticipator;
 | 
			
		||||
import com.massivecraft.factions.P;
 | 
			
		||||
import com.massivecraft.factions.integration.Econ;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
 | 
			
		||||
import org.bukkit.ChatColor;
 | 
			
		||||
 | 
			
		||||
@@ -21,7 +21,7 @@ public class CmdMoneyTransferFp extends FCommand
 | 
			
		||||
		
 | 
			
		||||
		//this.optionalArgs.put("", "");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.MONEY_F2P.node;
 | 
			
		||||
		this.permission = Perm.MONEY_F2P.node;
 | 
			
		||||
		this.setHelpShort("transfer f -> p");
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = false;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
package com.massivecraft.factions.cmd;
 | 
			
		||||
 | 
			
		||||
import com.massivecraft.factions.Conf;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.iface.EconomyParticipator;
 | 
			
		||||
import com.massivecraft.factions.P;
 | 
			
		||||
import com.massivecraft.factions.integration.Econ;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
 | 
			
		||||
import org.bukkit.ChatColor;
 | 
			
		||||
 | 
			
		||||
@@ -21,7 +21,7 @@ public class CmdMoneyTransferPf extends FCommand
 | 
			
		||||
		
 | 
			
		||||
		//this.optionalArgs.put("", "");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.MONEY_P2F.node;
 | 
			
		||||
		this.permission = Perm.MONEY_P2F.node;
 | 
			
		||||
		this.setHelpShort("transfer p -> f");
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = false;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
package com.massivecraft.factions.cmd;
 | 
			
		||||
 | 
			
		||||
import com.massivecraft.factions.Conf;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.iface.EconomyParticipator;
 | 
			
		||||
import com.massivecraft.factions.P;
 | 
			
		||||
import com.massivecraft.factions.integration.Econ;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
 | 
			
		||||
import org.bukkit.ChatColor;
 | 
			
		||||
 | 
			
		||||
@@ -19,7 +19,7 @@ public class CmdMoneyWithdraw extends FCommand
 | 
			
		||||
		this.requiredArgs.add("amount");
 | 
			
		||||
		this.optionalArgs.put("faction", "your");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.MONEY_WITHDRAW.node;
 | 
			
		||||
		this.permission = Perm.MONEY_WITHDRAW.node;
 | 
			
		||||
		this.setHelpShort("withdraw money");
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@ package com.massivecraft.factions.cmd;
 | 
			
		||||
 | 
			
		||||
import com.massivecraft.factions.Faction;
 | 
			
		||||
import com.massivecraft.factions.FPlayer;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.struct.Rel;
 | 
			
		||||
 | 
			
		||||
public class CmdOfficer extends FCommand
 | 
			
		||||
@@ -16,7 +16,7 @@ public class CmdOfficer extends FCommand
 | 
			
		||||
		this.requiredArgs.add("player name");
 | 
			
		||||
		//this.optionalArgs.put("", "");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.OFFICER.node;
 | 
			
		||||
		this.permission = Perm.OFFICER.node;
 | 
			
		||||
		this.disableOnLock = true;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = false;
 | 
			
		||||
@@ -31,7 +31,7 @@ public class CmdOfficer extends FCommand
 | 
			
		||||
		FPlayer you = this.argAsBestFPlayerMatch(0);
 | 
			
		||||
		if (you == null) return;
 | 
			
		||||
 | 
			
		||||
		boolean permAny = Permission.OFFICER_ANY.has(sender, false);
 | 
			
		||||
		boolean permAny = Perm.OFFICER_ANY.has(sender, false);
 | 
			
		||||
		Faction targetFaction = you.getFaction();
 | 
			
		||||
 | 
			
		||||
		if (targetFaction != myFaction && !permAny)
 | 
			
		||||
 
 | 
			
		||||
@@ -3,7 +3,7 @@ package com.massivecraft.factions.cmd;
 | 
			
		||||
import com.massivecraft.factions.Conf;
 | 
			
		||||
import com.massivecraft.factions.Faction;
 | 
			
		||||
import com.massivecraft.factions.Factions;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
 | 
			
		||||
public class CmdOpen extends FCommand
 | 
			
		||||
{
 | 
			
		||||
@@ -15,7 +15,7 @@ public class CmdOpen extends FCommand
 | 
			
		||||
		//this.requiredArgs.add("");
 | 
			
		||||
		this.optionalArgs.put("yes/no", "flip");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.OPEN.node;
 | 
			
		||||
		this.permission = Perm.OPEN.node;
 | 
			
		||||
		this.disableOnLock = false;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
package com.massivecraft.factions.cmd;
 | 
			
		||||
 | 
			
		||||
import com.massivecraft.factions.Faction;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.struct.FPerm;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.struct.Rel;
 | 
			
		||||
 | 
			
		||||
public class CmdPerm extends FCommand
 | 
			
		||||
@@ -18,7 +18,7 @@ public class CmdPerm extends FCommand
 | 
			
		||||
		this.optionalArgs.put("relation", "read");
 | 
			
		||||
		this.optionalArgs.put("yes/no", "read");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.PERM.node;
 | 
			
		||||
		this.permission = Perm.PERM.node;
 | 
			
		||||
		this.disableOnLock = true;
 | 
			
		||||
		
 | 
			
		||||
		this.errorOnToManyArgs = false;
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,7 @@ package com.massivecraft.factions.cmd;
 | 
			
		||||
 | 
			
		||||
import com.massivecraft.factions.Conf;
 | 
			
		||||
import com.massivecraft.factions.FPlayer;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
 | 
			
		||||
public class CmdPower extends FCommand
 | 
			
		||||
{
 | 
			
		||||
@@ -16,7 +16,7 @@ public class CmdPower extends FCommand
 | 
			
		||||
		//this.requiredArgs.add("faction tag");
 | 
			
		||||
		this.optionalArgs.put("player", "you");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.POWER.node;
 | 
			
		||||
		this.permission = Perm.POWER.node;
 | 
			
		||||
		this.disableOnLock = false;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = false;
 | 
			
		||||
@@ -31,7 +31,7 @@ public class CmdPower extends FCommand
 | 
			
		||||
		FPlayer target = this.argAsBestFPlayerMatch(0, fme);
 | 
			
		||||
		if (target == null) return;
 | 
			
		||||
		
 | 
			
		||||
		if (target != fme && ! Permission.POWER_ANY.has(sender, true)) return;
 | 
			
		||||
		if (target != fme && ! Perm.POWER_ANY.has(sender, true)) return;
 | 
			
		||||
 | 
			
		||||
		// if economy is enabled, they're not on the bypass list, and this command has a cost set, make 'em pay
 | 
			
		||||
		if ( ! payForCommand(Conf.econCostPower, "to show player power info", "for showing player power info")) return;
 | 
			
		||||
 
 | 
			
		||||
@@ -3,7 +3,7 @@ package com.massivecraft.factions.cmd;
 | 
			
		||||
import com.massivecraft.factions.Faction;
 | 
			
		||||
import com.massivecraft.factions.FPlayer;
 | 
			
		||||
import com.massivecraft.factions.P;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
 | 
			
		||||
public class CmdPowerBoost extends FCommand
 | 
			
		||||
{
 | 
			
		||||
@@ -16,7 +16,7 @@ public class CmdPowerBoost extends FCommand
 | 
			
		||||
		this.requiredArgs.add("name");
 | 
			
		||||
		this.requiredArgs.add("#");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.POWERBOOST.node;
 | 
			
		||||
		this.permission = Perm.POWERBOOST.node;
 | 
			
		||||
		this.disableOnLock = true;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = false;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
package com.massivecraft.factions.cmd;
 | 
			
		||||
 | 
			
		||||
import com.massivecraft.factions.FPlayer;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.struct.Rel;
 | 
			
		||||
 | 
			
		||||
public class CmdPromote extends FCommand
 | 
			
		||||
@@ -15,7 +15,7 @@ public class CmdPromote extends FCommand
 | 
			
		||||
		this.requiredArgs.add("player name");
 | 
			
		||||
		//this.optionalArgs.put("", "");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.PROMOTE.node;
 | 
			
		||||
		this.permission = Perm.PROMOTE.node;
 | 
			
		||||
		this.disableOnLock = true;
 | 
			
		||||
		
 | 
			
		||||
		//To promote someone from recruit -> member you must be an officer.
 | 
			
		||||
 
 | 
			
		||||
@@ -5,7 +5,7 @@ import com.massivecraft.factions.Conf;
 | 
			
		||||
import com.massivecraft.factions.FPlayers;
 | 
			
		||||
import com.massivecraft.factions.Factions;
 | 
			
		||||
import com.massivecraft.factions.P;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
 | 
			
		||||
public class CmdReload extends FCommand
 | 
			
		||||
{
 | 
			
		||||
@@ -18,7 +18,7 @@ public class CmdReload extends FCommand
 | 
			
		||||
		//this.requiredArgs.add("");
 | 
			
		||||
		this.optionalArgs.put("file", "all");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.RELOAD.node;
 | 
			
		||||
		this.permission = Perm.RELOAD.node;
 | 
			
		||||
		this.disableOnLock = false;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = false;
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@ import com.massivecraft.factions.Board;
 | 
			
		||||
import com.massivecraft.factions.Conf;
 | 
			
		||||
import com.massivecraft.factions.FPlayers;
 | 
			
		||||
import com.massivecraft.factions.Factions;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
 | 
			
		||||
public class CmdSaveAll extends FCommand
 | 
			
		||||
{
 | 
			
		||||
@@ -18,7 +18,7 @@ public class CmdSaveAll extends FCommand
 | 
			
		||||
		//this.requiredArgs.add("");
 | 
			
		||||
		//this.optionalArgs.put("", "");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.SAVE.node;
 | 
			
		||||
		this.permission = Perm.SAVE.node;
 | 
			
		||||
		this.disableOnLock = false;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = false;
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,8 @@ import org.bukkit.Location;
 | 
			
		||||
import org.bukkit.Material;
 | 
			
		||||
import org.bukkit.World;
 | 
			
		||||
import org.bukkit.entity.Player;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.util.VisualizeUtil;
 | 
			
		||||
 | 
			
		||||
public class CmdSeeChunk extends FCommand
 | 
			
		||||
@@ -15,7 +16,7 @@ public class CmdSeeChunk extends FCommand
 | 
			
		||||
		this.aliases.add("sc");
 | 
			
		||||
		this.aliases.add("seechunk");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.SEE_CHUNK.node;
 | 
			
		||||
		this.permission = Perm.SEE_CHUNK.node;
 | 
			
		||||
		this.disableOnLock = false;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -4,8 +4,8 @@ import com.massivecraft.factions.Board;
 | 
			
		||||
import com.massivecraft.factions.Conf;
 | 
			
		||||
import com.massivecraft.factions.FLocation;
 | 
			
		||||
import com.massivecraft.factions.Faction;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.struct.FPerm;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
 | 
			
		||||
public class CmdSethome extends FCommand
 | 
			
		||||
{
 | 
			
		||||
@@ -16,7 +16,7 @@ public class CmdSethome extends FCommand
 | 
			
		||||
		//this.requiredArgs.add("");
 | 
			
		||||
		this.optionalArgs.put("faction", "your");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.SETHOME.node;
 | 
			
		||||
		this.permission = Perm.SETHOME.node;
 | 
			
		||||
		this.disableOnLock = true;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -9,8 +9,8 @@ import com.massivecraft.factions.Conf;
 | 
			
		||||
import com.massivecraft.factions.integration.Econ;
 | 
			
		||||
import com.massivecraft.factions.FPlayer;
 | 
			
		||||
import com.massivecraft.factions.Faction;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.struct.FFlag;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.struct.Rel;
 | 
			
		||||
import com.massivecraft.factions.zcore.util.TextUtil;
 | 
			
		||||
 | 
			
		||||
@@ -24,7 +24,7 @@ public class CmdShow extends FCommand
 | 
			
		||||
		//this.requiredArgs.add("");
 | 
			
		||||
		this.optionalArgs.put("faction", "your");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.SHOW.node;
 | 
			
		||||
		this.permission = Perm.SHOW.node;
 | 
			
		||||
		this.disableOnLock = false;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -7,9 +7,9 @@ import org.bukkit.Bukkit;
 | 
			
		||||
import com.massivecraft.factions.Conf;
 | 
			
		||||
import com.massivecraft.factions.Faction;
 | 
			
		||||
import com.massivecraft.factions.Factions;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.event.FactionRenameEvent;
 | 
			
		||||
import com.massivecraft.factions.integration.SpoutFeatures;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.util.MiscUtil;
 | 
			
		||||
 | 
			
		||||
public class CmdTag extends FCommand
 | 
			
		||||
@@ -22,7 +22,7 @@ public class CmdTag extends FCommand
 | 
			
		||||
		this.requiredArgs.add("new tag");
 | 
			
		||||
		//this.optionalArgs.put("", "");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.TAG.node;
 | 
			
		||||
		this.permission = Perm.TAG.node;
 | 
			
		||||
		this.disableOnLock = true;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -2,8 +2,8 @@ package com.massivecraft.factions.cmd;
 | 
			
		||||
 | 
			
		||||
import com.massivecraft.factions.Conf;
 | 
			
		||||
import com.massivecraft.factions.FPlayer;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.integration.SpoutFeatures;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.zcore.util.TextUtil;
 | 
			
		||||
 | 
			
		||||
public class CmdTitle extends FCommand
 | 
			
		||||
@@ -15,7 +15,7 @@ public class CmdTitle extends FCommand
 | 
			
		||||
		this.requiredArgs.add("player");
 | 
			
		||||
		this.optionalArgs.put("title", "");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.TITLE.node;
 | 
			
		||||
		this.permission = Perm.TITLE.node;
 | 
			
		||||
		this.disableOnLock = true;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -10,8 +10,8 @@ import com.massivecraft.factions.integration.SpoutFeatures;
 | 
			
		||||
import com.massivecraft.factions.FLocation;
 | 
			
		||||
import com.massivecraft.factions.Faction;
 | 
			
		||||
import com.massivecraft.factions.P;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.struct.FPerm;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
 | 
			
		||||
public class CmdUnclaim extends FCommand
 | 
			
		||||
{
 | 
			
		||||
@@ -23,7 +23,7 @@ public class CmdUnclaim extends FCommand
 | 
			
		||||
		//this.requiredArgs.add("");
 | 
			
		||||
		//this.optionalArgs.put("", "");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.UNCLAIM.node;
 | 
			
		||||
		this.permission = Perm.UNCLAIM.node;
 | 
			
		||||
		this.disableOnLock = true;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -5,10 +5,10 @@ import org.bukkit.Bukkit;
 | 
			
		||||
import com.massivecraft.factions.Board;
 | 
			
		||||
import com.massivecraft.factions.Conf;
 | 
			
		||||
import com.massivecraft.factions.P;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.event.LandUnclaimAllEvent;
 | 
			
		||||
import com.massivecraft.factions.integration.Econ;
 | 
			
		||||
import com.massivecraft.factions.integration.SpoutFeatures;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
 | 
			
		||||
public class CmdUnclaimall extends FCommand
 | 
			
		||||
{	
 | 
			
		||||
@@ -20,7 +20,7 @@ public class CmdUnclaimall extends FCommand
 | 
			
		||||
		//this.requiredArgs.add("");
 | 
			
		||||
		//this.optionalArgs.put("", "");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.UNCLAIM_ALL.node;
 | 
			
		||||
		this.permission = Perm.UNCLAIM_ALL.node;
 | 
			
		||||
		this.disableOnLock = true;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
package com.massivecraft.factions.cmd;
 | 
			
		||||
 | 
			
		||||
import com.massivecraft.factions.P;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
public class CmdVersion extends FCommand
 | 
			
		||||
@@ -13,7 +13,7 @@ public class CmdVersion extends FCommand
 | 
			
		||||
		//this.requiredArgs.add("");
 | 
			
		||||
		//this.optionalArgs.put("", "");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.VERSION.node;
 | 
			
		||||
		this.permission = Perm.VERSION.node;
 | 
			
		||||
		this.disableOnLock = false;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = false;
 | 
			
		||||
 
 | 
			
		||||
@@ -4,10 +4,10 @@ import org.bukkit.Bukkit;
 | 
			
		||||
 | 
			
		||||
import com.massivecraft.factions.Conf;
 | 
			
		||||
import com.massivecraft.factions.Faction;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.event.FactionRelationEvent;
 | 
			
		||||
import com.massivecraft.factions.integration.SpoutFeatures;
 | 
			
		||||
import com.massivecraft.factions.struct.FFlag;
 | 
			
		||||
import com.massivecraft.factions.struct.Permission;
 | 
			
		||||
import com.massivecraft.factions.struct.Rel;
 | 
			
		||||
 | 
			
		||||
public abstract class FRelationCommand extends FCommand
 | 
			
		||||
@@ -20,7 +20,7 @@ public abstract class FRelationCommand extends FCommand
 | 
			
		||||
		this.requiredArgs.add("faction");
 | 
			
		||||
		//this.optionalArgs.put("", "");
 | 
			
		||||
		
 | 
			
		||||
		this.permission = Permission.RELATION.node;
 | 
			
		||||
		this.permission = Perm.RELATION.node;
 | 
			
		||||
		this.disableOnLock = true;
 | 
			
		||||
		
 | 
			
		||||
		senderMustBePlayer = true;
 | 
			
		||||
 
 | 
			
		||||
@@ -16,6 +16,7 @@ import com.massivecraft.factions.FPlayer;
 | 
			
		||||
import com.massivecraft.factions.FPlayers;
 | 
			
		||||
import com.massivecraft.factions.Faction;
 | 
			
		||||
import com.massivecraft.factions.P;
 | 
			
		||||
import com.massivecraft.factions.Perm;
 | 
			
		||||
import com.massivecraft.factions.iface.RelationParticipator;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@@ -167,7 +168,7 @@ public enum FPerm
 | 
			
		||||
		{
 | 
			
		||||
			FPlayer fplayer = (FPlayer)rpSubject;
 | 
			
		||||
			fplayer.msg(errorpattern, hostFaction.describeTo(fplayer, true), this.getDescription());
 | 
			
		||||
			if (Permission.ADMIN.has(fplayer.getPlayer()))
 | 
			
		||||
			if (Perm.ADMIN.has(fplayer.getPlayer()))
 | 
			
		||||
			{
 | 
			
		||||
				fplayer.msg("<i>You can bypass by using " + P.p.cmdBase.cmdBypass.getUseageTemplate(false));
 | 
			
		||||
			}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user