Want a better Minecraft server? Read about SpigotMC here!
Separate names with a comma.
Discussion in 'Spigot Plugin Development' started by catssss, Apr 18, 2020.
my plugin won't even make a folder for the config
You need to create a new file if the file does not exist.
Java's File constructor returns always a file, but it does not create a new File unless you are using File#createNewFile
Since you're only using a single configuration file, you could just follow this tutorial in the spigot wiki to achieve the same result in a lot easier way.
1. how do I check if it exists or not I saw something about it but don't completely remember
2. I wanted to do it this way because I wanted to try and figure out how to do it this way so I could use multiple files in the future.
Do something like this:
They should probably create the plugin's data directory before creating the config file itself:
Yes indeed. Code corrected