// Path: src/com/maximuspayne/navycraft/plugins/PermissionInterface.java
// public class PermissionInterface {
// 	public static NavyCraft plugin;
// 	//public static PermissionInfo Permissions = null;
// 
// 	public static void setupPermissions(NavyCraft p) {
// 		plugin = p;
// 		PluginManager pm = NavyCraft.instance.getServer().getPluginManager();
// 		if(pm != null) {
// 			pm.addPermission(new Permission("navycraft.periscope.use"));
// 			pm.addPermission(new Permission("navycraft.aa-gun.use"));
// 			pm.addPermission(new Permission("navycraft.periscope.create"));
// 			pm.addPermission(new Permission("navycraft.aa-gun.create"));
// 			
// 			for (CraftType type : CraftType.craftTypes) 
// 			{
// 				pm.addPermission(new Permission("navycraft." + type.name + ".release"));
// 				pm.addPermission(new Permission("navycraft." + type.name + ".info"));
// 				pm.addPermission(new Permission("navycraft." + type.name + ".takeover"));
// 				pm.addPermission(new Permission("navycraft." + type.name + ".start"));
// 				pm.addPermission(new Permission("navycraft." + type.name + ".create"));
// 				pm.addPermission(new Permission("navycraft." + type.name + ".sink"));
// 				pm.addPermission(new Permission("navycraft." + type.name + ".remove"));
// 			}
// 		}
// 	}
// 	
// 	
// 	
// 	public static boolean CheckPerm(Player player, String command) {		
// 		command = command.replace(" ", ".");
// 		NavyCraft.instance.DebugMessage("Checking if " + player.getName() + " can " + command, 3);
// 		
// 		
// 		    if( player.hasPermission(command) || player.isOp() ) 
// 		    {
// 		    	NavyCraft.instance.DebugMessage("Player has permissions: " + command, 3);
// 		    	NavyCraft.instance.DebugMessage("Player isop: " + 
// 		    			player.isOp(), 3);
// 		    	return true;
// 		    } else 
// 		    {
// 				player.sendMessage("You do not have permission to perform " + command);
// 				return false;
// 		    }
// 	}
// 	
// 	public static boolean CheckQuietPerm(Player player, String command) {		
// 		command = command.replace(" ", ".");
// 		NavyCraft.instance.DebugMessage("Checking if " + player.getName() + " can " + command, 3);
// 		
// 		
// 		    if( player.hasPermission(command) || player.isOp() ) 
// 		    {
// 		    	NavyCraft.instance.DebugMessage("Player has permissions: " + command, 3);
// 		    	NavyCraft.instance.DebugMessage("Player isop: " + 
// 		    			player.isOp(), 3);
// 		    	return true;
// 		    } else 
// 		    {
// 				//player.sendMessage("You do not have permission to perform " + command);
// 				return false;
// 		    }
// 	}
// 	
// 	public static boolean CheckEnabledWorld(Location loc) {
// 		if(!plugin.ConfigSetting("EnabledWorlds").equalsIgnoreCase("null")) {
// 			String[] worlds = NavyCraft.instance.ConfigSetting("EnabledWorlds").split(",");
// 			for(int i = 0; i < worlds.length; i++) {
// 				if( loc.getWorld().getName().equalsIgnoreCase(worlds[i]) )
// 				{
// 					return true;
// 				}
// 					
// 			}
// 			return false;
// 		}
// 		return true;
// 	}
// }


import java.io.*;
import java.util.ArrayList;
import org.bukkit.entity.Player;
import com.maximuspayne.navycraft.plugins.PermissionInterface;
		if(NavyCraft.instance.ConfigSetting("ForbiddenBlocks") != "null") {
			bob = NavyCraft.instance.ConfigSetting("ForbiddenBlocks").split(",");
			juan = new short[bob.length];
			for(int i = 0; i < bob.length; i++) {
				try {
					juan[i] = Short.parseShort(bob[i]);
				}
				catch (Exception ex){
				}
			}
			if(juan != null && juan.length > 0 && juan[0] != 0)
				forbiddenBlocks = juan;
		}
	}

	public static CraftType getCraftType(String name) {

		for (CraftType type : craftTypes) {
			if (type.name.equalsIgnoreCase(name))
				return type;
		}

		return null;
	}

	public String getCommand() {
		return "/" + name.toLowerCase();
	}

	public Boolean canUse(Player player){
// Path: src/com/maximuspayne/navycraft/plugins/PermissionInterface.java
// public class PermissionInterface {
// 	public static NavyCraft plugin;
// 	//public static PermissionInfo Permissions = null;
// 
// 	public static void setupPermissions(NavyCraft p) {
// 		plugin = p;
// 		PluginManager pm = NavyCraft.instance.getServer().getPluginManager();
// 		if(pm != null) {
// 			pm.addPermission(new Permission("navycraft.periscope.use"));
// 			pm.addPermission(new Permission("navycraft.aa-gun.use"));
// 			pm.addPermission(new Permission("navycraft.periscope.create"));
// 			pm.addPermission(new Permission("navycraft.aa-gun.create"));
// 			
// 			for (CraftType type : CraftType.craftTypes) 
// 			{
// 				pm.addPermission(new Permission("navycraft." + type.name + ".release"));
// 				pm.addPermission(new Permission("navycraft." + type.name + ".info"));
// 				pm.addPermission(new Permission("navycraft." + type.name + ".takeover"));
// 				pm.addPermission(new Permission("navycraft." + type.name + ".start"));
// 				pm.addPermission(new Permission("navycraft." + type.name + ".create"));
// 				pm.addPermission(new Permission("navycraft." + type.name + ".sink"));
// 				pm.addPermission(new Permission("navycraft." + type.name + ".remove"));
// 			}
// 		}
// 	}
// 	
// 	
// 	
// 	public static boolean CheckPerm(Player player, String command) {		
// 		command = command.replace(" ", ".");
// 		NavyCraft.instance.DebugMessage("Checking if " + player.getName() + " can " + command, 3);
// 		
// 		
// 		    if( player.hasPermission(command) || player.isOp() ) 
// 		    {
// 		    	NavyCraft.instance.DebugMessage("Player has permissions: " + command, 3);
// 		    	NavyCraft.instance.DebugMessage("Player isop: " + 
// 		    			player.isOp(), 3);
// 		    	return true;
// 		    } else 
// 		    {
// 				player.sendMessage("You do not have permission to perform " + command);
// 				return false;
// 		    }
// 	}
// 	
// 	public static boolean CheckQuietPerm(Player player, String command) {		
// 		command = command.replace(" ", ".");
// 		NavyCraft.instance.DebugMessage("Checking if " + player.getName() + " can " + command, 3);
// 		
// 		
// 		    if( player.hasPermission(command) || player.isOp() ) 
// 		    {
// 		    	NavyCraft.instance.DebugMessage("Player has permissions: " + command, 3);
// 		    	NavyCraft.instance.DebugMessage("Player isop: " + 
// 		    			player.isOp(), 3);
// 		    	return true;
// 		    } else 
// 		    {
// 				//player.sendMessage("You do not have permission to perform " + command);
// 				return false;
// 		    }
// 	}
// 	
// 	public static boolean CheckEnabledWorld(Location loc) {
// 		if(!plugin.ConfigSetting("EnabledWorlds").equalsIgnoreCase("null")) {
// 			String[] worlds = NavyCraft.instance.ConfigSetting("EnabledWorlds").split(",");
// 			for(int i = 0; i < worlds.length; i++) {
// 				if( loc.getWorld().getName().equalsIgnoreCase(worlds[i]) )
// 				{
// 					return true;
// 				}
// 					
// 			}
// 			return false;
// 		}
// 		return true;
// 	}
// }


// Path: src/com/maximuspayne/navycraft/CraftType.java
import java.io.*;
import java.util.ArrayList;
import org.bukkit.entity.Player;
import com.maximuspayne.navycraft.plugins.PermissionInterface;

		if(NavyCraft.instance.ConfigSetting("ForbiddenBlocks") != "null") {
			bob = NavyCraft.instance.ConfigSetting("ForbiddenBlocks").split(",");
			juan = new short[bob.length];
			for(int i = 0; i < bob.length; i++) {
				try {
					juan[i] = Short.parseShort(bob[i]);
				}
				catch (Exception ex){
				}
			}
			if(juan != null && juan.length > 0 && juan[0] != 0)
				forbiddenBlocks = juan;
		}
	}

	public static CraftType getCraftType(String name) {

		for (CraftType type : craftTypes) {
			if (type.name.equalsIgnoreCase(name))
				return type;
		}

		return null;
	}

	public String getCommand() {
		return "/" + name.toLowerCase();
	}

	public Boolean canUse(Player player){
		if(PermissionInterface.CheckPerm(player, "navycraft." + name.toLowerCase()))