I'm trying to get the world name, so in end result I can store relevant data for my mod in the correct folder. In clients, the file structure is /saves/worldName. For the servers it looks like its just /worldName .
I know servers will load the world based on what is in server.properties . But reading that seems sloppy, and I do not know how to read what world is loaded for singleplayer.
What methods can I use to get a world name?