@SuppressWarnings("unchecked")
	public HashMap<ShieldOwner, Shield> loadShieldsFromFile() {
		if (!shieldsFile.exists() || plugin.getListener() == null || plugin.getListener().getShields() == null) {
			return null;
		}
		
		//if (directory.)
		new File(directory).mkdir();

		HashMap<ShieldOwner, Shield> map = new HashMap<ShieldOwner, Shield>();
		Object result = null;
		
		try {
			shieldsDB.load(shieldsFile);
			
			if (shieldsDB.contains("shieldOwner"))
			{
			String result1 = shieldsDB.getString("shieldOwner", "0");
			
			//Faction result2 = (Faction) shieldsDB.getList("net.sqdmc.factionshield." + result1 + ".owner");
			log.info(result1);
			
			
			Factions factions = Factions.i;
			
			if (!factions.exists(result1)){
				log.info("Faction doesn't exisit!");
				return null;
			}
			
			Faction faction = factions.get(result1);
			
			FactionShieldOwner fShieldOwner = new FactionShieldOwner(faction);
			//ShieldBase shieldbase = new ShieldBase();
			
			Shield shield = new Shield(fShieldOwner);
			
			shield.setShieldPower(100);
			shield.setMaxShieldPower(100);
			//ShieldBase shieldbase = new ShieldBase(null, null, shield, null, Durability, Durability, Durability);
		
			//log.info(fShieldOwner.getId());
			//log.info(fShieldOwner.toString());
			//log.info(shield.getOwner().toString());
		
			map.put(fShieldOwner, shield);
			
			return map;
			}
			//map = (HashMap<ShieldOwner, Shield>) result;
			
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (InvalidConfigurationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}