Jump to content

Recommended Posts

Posted

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!

Posted

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!

Posted

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!

Posted

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!

Posted

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.