Created
September 22, 2012 16:43
-
-
Save XCompWiz/3766703 to your computer and use it in GitHub Desktop.
Basic onWorldLoad get world filedir
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ForgeSubscribe | |
public void worldLoadEvent(Load event) { | |
getWorldDir(event.world); | |
} | |
private File getWorldDir(World world) { | |
String str = ""; //FIXME: Get base directory (using | |
str = str + world.getSaveHandler().getSaveDirectoryName(); | |
if (world.provider.getSaveFolder() != null) { | |
str = str + world.provider.getSaveFolder(); | |
} | |
File file = new File(str); | |
return file; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment