This will inflict the hit entity (whatever you just clobbered with your sword) with the wither effect for 200 ticks (10 seconds). at level 1. You can play around with potion ID, duration and level as you have with your armour effects, it's the same construct.
The amusing thing with this method is that you can set what happens after "hitEntity." to loads of things:
hitEntity.motionY = 2.5D; Sends the hit entity about 30 blocks into the air (motionX & motionZ can be used for horizontal travel)
hitEntity.travelToDimension(-1); Sends the hit entity to Hell! (Dimension -1 is the nether)
hitEntity.setFire(5); Sets the entity on fire for 5 seconds.
Not strictly related, but you may also want to put this in the class:
public boolean hasEffect(ItemStack itemstack)
This gives your sword the shiny enchanted effect, making it look magical
Hope this helps, as usual message back if you don't understand or want to expand, and don't forget to press that green arrow if it helped!
Override Item#hitEntity to apply the potion effect, call super.hitEntity and return true. The first EntityLivingBase argument is the entity that was hit, the second is the entity that used the item to hit the first.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.