package markehme.FactionsPerms;

import java.util.logging.Level;

import markehme.FactionsPerms.commands.*;

import com.massivecraft.factions.Factions;
import com.massivecraft.factions.cmd.FCommand;

public class FactionsPermsCommandSetup {

	public FactionsPermsCommandSetup() {
		// Command: /f permissions
		FactionsPerms.get().getLogger().log(Level.INFO, "Hooking command ... ");
		addSubCommand(new CmdPerm());
		FactionsPerms.get().getLogger().log(Level.INFO, "Command hooked! Ready.");
	}
	
	public void addSubCommand(FCommand subCommand) {
		try {
			Factions.get().getOuterCmdFactions().addSubCommand(subCommand);
		} catch(Exception e) {
			FactionsPerms.get().getLogger().log(Level.INFO, "Apparently factions was ready, but we still couldn't add the permissons subcommand?");
		}
	}
}

@@ -234,16 +234,56 @@
 Setup %7B%0A
+%09%0A%09public static FactionsPermsAPI api;%0A%09
 %0A%09public

Add the API here