1.15.2 How to make a data folder?

Discussion in 'Spigot Plugin Development' started by JusticeKing, Mar 31, 2020.

  1. I am working on a SkyBlock plugin and I want to make a data folder. I want a folder to be created in the plugins folder when the plugin starts up, just like every other plugin. Does this happen automatically, and if so, how do I put things in it using code?
  2. You can easily create it using getDataFolder().mkdir(); method from Plugin interface.

    Code (Java):
    public final class SkyBlockPlugin extends JavaPlugin {

        @Override public void onLoad() {
    #2 NyanGuyMF, Mar 31, 2020
    Last edited: Mar 31, 2020
  3. That's it? Seriously? That is cool.