public void savePossibleTreasure() throws IOException
    {
    	numberOfTreasures = possibleTreasures.size();
    	
    	FileOutputStream fos = new FileOutputStream(TreasureHunt.getInstance().getDataFolder() + "/numberOfTreasures.xml");
    	if(fos == null) return;
    	ObjectOutputStream oos = new ObjectOutputStream(fos);
    	if(oos == null) return;
    	oos.writeObject(numberOfTreasures);
    	oos.close();
    	
    	for(int i = 0; i < possibleTreasures.size(); i++)
    	{
        	for(int j = 0; j < possibleTreasures.get(i).getLoot().size(); j++)
        	{
        		TreasureHunt.getInstance().getConfig().set("PossibleTreasures."+i+"."+j, possibleTreasures.get(i).getLoot().get(j));
        	}
    	}
    	TreasureHunt.getInstance().saveConfig();
    }