quite a lot of trouble had once been caused in unseen university by a former archchancellor 's hat , which had picked up too many magical vibrations after spending so much time on wizardly heads and had developed a personality of its very own .