Copying folder/world from resources inside the .jar

Discussion in 'Plugin Development' started by CahyaAziz, Oct 13, 2021.

  1. Offline

    CahyaAziz

    Hello. How do I copy the folder and all of it's contents from the plugin resources folder inside the .jar into the main server folder?
    I put a world folder there and would like to access it.

    Thanks
     
  2. Offline

    timtower Administrator Administrator Moderator

    @CahyaAziz Why do you put a world folder IN the plugin?
     
  3. Offline

    CahyaAziz

    I am making a plugin for my friend and I want all the maps to be inside the plugin so that they don't need to download the maps by themselves
     
  4. Offline

    timtower Administrator Administrator Moderator

    @CahyaAziz saveResource in the plugin class.
    Would have them as zips though.
     
  5. Offline

    CahyaAziz

    Do i just do something like
    Code:
    saveResource("mapfolder", true)
    ?
     
  6. Offline

    timtower Administrator Administrator Moderator

  7. Offline

    CahyaAziz

  8. Offline

    timtower Administrator Administrator Moderator

    @CahyaAziz Corrupted? Tried it with a simple txt file?
     
  9. Offline

    davidclue

    @CahyaAziz Why not have the plugin download the zip from online, you can use a service like Mediafire to upload the file.
     

Share This Page