Well, let me at least answer the why-part, in addition to codegasmer's answer: it is simply because any of the methods you call throws an IOException. This could be typeMap.get() (which I would not expect in this case, but threoretically possible), the 'gui' method or the constructor of RandomPlayer.
codegasmer shows a way to identify, which of these methods is responsible, you would see it in the stack trace - and even reveal in which of the methods the method in question called the exception was thrown.
If you can live with simply catching the exception and providing a fallback solution, you could do so (e. g. by creating a fallback object in the catch block). Better is to find out, what was the original cause of the exception and then avoid it, if possible. Using a debugger can help here very much. As I do not know any details of the involved classes, I cannot provide any further help here.