Effect of chemically induced permittivity changes on the plasmonic properties of metal nanoparticles