Take a look at the first line in your method:
return super.onItemRightClick(worldIn, playerIn, handIn);
This is a return statement, which means that the method is ended here and all statements after can't be reached (Exactly what your IDE is telling you)
You have to remove this statement and add your return statement at the end of the method.
There you want to return a new ActionResult using ActionResult#newResult
Nice Greetings
TechMage