Posted February 5, 201510 yr So I need to get a file from the .minecraft folder. Is that possible? I have seen mods like Not Enough Items and Flans do it. So how would I do this? any pointers? I'm back from being gone for... I think its been about a year. I'm pretty sure nobody remembers me, but hello anybody who does!
February 5, 201510 yr Author Its a YAML file. See what I actually need to do, is get into the plugins folder on a server, and get a file from one of the plugin folders. So yeah its called regions.yml Its from the worldguard plugin. I'm back from being gone for... I think its been about a year. I'm pretty sure nobody remembers me, but hello anybody who does!
February 5, 201510 yr Author MinecraftServer().getServer().getFile("plugins/.../someFile.ext") Oh cool. But do I have to check if its on an smp? I'm back from being gone for... I think its been about a year. I'm pretty sure nobody remembers me, but hello anybody who does!
February 5, 201510 yr Author No. In SinglePlayer this would return the "plugins" folder inside the .minecraft. Ohhh... That makes sense. Thanks for your help. And one more question on that. If there is no file inside .minecraft will it make it? Because, i would rather not have random empty folders in peoples .minecraft. I'm back from being gone for... I think its been about a year. I'm pretty sure nobody remembers me, but hello anybody who does!
February 5, 201510 yr Author No, it will just return a File object. Thats awesome! Thanks for helping! I'm back from being gone for... I think its been about a year. I'm pretty sure nobody remembers me, but hello anybody who does!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.