BukkitDev upload non-jar or non-plugin files

Discussion in 'Plugin Development' started by knokko, Jun 30, 2017.

Thread Status:
Not open for further replies.
  1. Recently I created a plug-in that changes the recipes and properties of armor, depending on the config.yml of the plug-in. I used the 'Files' section of my project to upload the .jar file of my plug-in, which worked fine.

    However, it seems that I can only upload bukkit plug-ins to that section, so no other files. And after a bit of research, I saw that the forum doesn't really appreciate links to other sites.

    For now, I had like to upload some premade/example configs, but where should I upload those? And how about uploading jar files that are no plug-ins? (I might want to do that in the future)

    If I am posting this thread on the wrong section or forum, could you tell me what section would be the right section for this question?
     
  2. Offline

    timtower Administrator Administrator Moderator

  3. Thanks for the fast reply. I already put the direct text in code blocks, I figured that out quickly.
    I was trying to upload a direct file, not just a lot of text, so people can directly download it and paste in the folder for the plug-in. With his way, nothing could go wrong with copying and loose spaces since yml files usually don't like any space characters at the wrong place.
    With non plugins, I was thinking about a simple java application that would help with creating config files and compress them.
     
  4. Offline

    Zombie_Striker

    @knokko
    You can always include configs in the jar themselves. Calling saveDefaultConfig while having a config.yml in the root of your jar (where the plugin.yml is) will put all the text for the pre-made jar in config that will be used. Additionally, if you wanted to store multiple files and have worked with reading files from project resources, you can make a small toolkit that selects one of the premade configs.
     
    knokko likes this.
  5. @Zombie_Striker
    This method should work for premade configs indeed. But since those files easily reach the 20 kB and can be generated with a few lines of code, I suppose I had better hardcode a few lines for those configs. So, thank you for the idea!

    Now, I would still like to know how to add those non plugin jar files. Would there be a legitimate way to add those files to the project, or is anything in that direction completely forbidden?
     
  6. Offline

    timtower Administrator Administrator Moderator

    @knokko Those are not allowed as far as I know, not 100% sure though
     
  7. So, I would have to create some kind of menu within minecraft using inventory menu's?

    Or would the Bukkit Tools section of this forum be the right place for a jar to create files like configs?
     
  8. Offline

    timtower Administrator Administrator Moderator

    @knokko Or an online tool.
    Really depends on the difficulty in the config.
     
Thread Status:
Not open for further replies.

Share This Page