It seems that weird that coffee could get into your eyes. So sorry to hear that anyway. So, what you should do right now is to use plenty of clean water mixed with salt to flush your eyes. Next, try to get some antibiotic eye drops to deal with your problem. It is natural for you to have painful eyes and please avoid rubbing your eyes because it may result in infections. It is not serious anyway, maybe 2 or 3 days you could be recovered.
Well, in some degree, it can not be harmful to your eyes when you get some coffee into your eyes. But on the other hand, for some people whose eyes are so sensitive that once there are some objects getting into the eyes, it will just be the irritants in the eyes, and then eye pain may occur. It is just like your situation. So for your situation, you can just wash your eyes with pure water, and then ripe it with clean, soft cloth. Finally, some eye drops are essential too. Anyway, just take more care of your eyes.
Well, take easy and it really hardly to cause eye problems. But it makes your painful indeed, especially hot coffee. However, if coffee entered your eyes, don't get out of them by your hands, that is, no rubbing on your eyes. You'd better use warm and clean water flush your eyes and then put a watery towel on your eyes for 10 minutes. After that, drop some basic drops into your eyes which may make your eyes much comfortable. If these remedies don't work, visit a doctor as soon as you can and take note from them.