While normally, I'm against violence,
in a case such as yours,
self-defense / protecting yourself from a bully
by hitting him before he hits you,
or by hitting him back,
sounds like something you might want to think about.
Other ways to defend yourself,
involving prevention,
are actually better:
Not letting yourself get smacked in the first place.
1) Asserting yourself so that the guy will leave you alone. You'll need to exude self-confidence for this to work, and know what to say in advance.
2) Getting away from or avoiding this person so you will not be his punching bag.
But yeah, the coffee idea is real tempting too ...
Now I would be nice enough to make sure it was lukewarm, cool, or cold coffee,
because I wouldn't want to burn the guy or do any serious damage.
I would simply want to make the point: Don't mess with me.
So, he would either be wiping coffee from his hair and face,
or wearing it.
"Hey dude, you want some coffee?"
... "Oh, and how about some cream to go with it?"
...