Further to what everyone else has said - use the EntityJoinWorldEvent#getEntity() method, checking if it's instanceof EntityPlayer.
Attempting to use the Minecraft class server side will crash your game when run on a dedicated server, because Minecraft doesn't exist server-side. So drop that idea now, it's a non-starter.