In any server with PVP set to 'false' in server.properties, tools and swords will take damage when used to attack another player. The player does not take damage because PVP is switched off, but the tool does take damage.
Related issues
Comments

In any server with PVP set to 'false' in server.properties, tools and swords will take damage when used to attack another player. The player does not take damage because PVP is switched off, but the tool does take damage.
migrated
(Unassigned)
Unconfirmed
Minecraft 1.9 Pre-Release 2
Retrieved
Don't duplicate your own tickets MC-97755