Can't enchant diamond sword

Any tool can only be enchanted once. If the tool has been previously enchanted, or you have used an enchanted book on it in the anvil, then it can not be re-enchanted regardless of how much experience you have.


In addition to the Diamond Sword, you also need Lapis Lazulli (3) to enchant.

source