public class TestSword extends ItemSword {
public TestSword(ToolMaterial material) {
super(material);
}
@Override
public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker) {
target.addPotionEffect(new PotionEffect(Potion.blindness.getId(), 100, 100));
return super.hitEntity(stack, target, attacker);
}
}