#config.yml help

1 messages · Page 1 of 1 (latest)

slate trellis
#
package me.theeyeofthepotato.varm;

import org.bukkit.plugin.java.JavaPlugin;

import me.theeyeofthepotato.varm.parser.Varm;
import me.theeyeofthepotato.varm.parser.VarmTab;

public class Main extends JavaPlugin {
    
    @Override
    public void onEnable() {
        new Varm(this);
        this.getCommand("varm").setTabCompleter(new VarmTab());
        this.saveDefaultConfig();
    }
    
    @Override
    public void onDisable() {
        
    }
}

according to the spigot docs, this code should generate a new config.yml file in the plugin's data folder. It does not create the data folder nor does it create the config.yml file. Any reason that you guys can see? Thanks in advance!

echo phoenix
#

It will only create the config.yml IF a config.yml exists inside the jar

slate trellis
#

so where do I put the config.yml

echo phoenix
#

are you using a build system like Maven or Gradle?

slate trellis
#

I think Maven

echo phoenix
#

Then there should be a resources folder inside src/main somewhere

slate trellis
#

that's the main package, in my case package me.theeyeofthepotato.varm;?

echo phoenix
#

no, there are folders in your project

slate trellis
#

I don't see any folders

#

inside my src, I have two packages

#

and that's it

echo phoenix
#

I'll assume you are using InteliJ

slate trellis
#

(and a plugin.yml)

#

eclipse

slate trellis
#

that is not at all what mine looks like

echo phoenix
#

it is very close

slate trellis
#

...not really?

#

hold on

#

see?

echo phoenix
#

ok no pom, so you are not using any build system

slate trellis
#

oh ok then

echo phoenix
#

put your config.yml in the same place your plugin.yml is

slate trellis
#

ah ok

#

do I need a build system?

echo phoenix
#

no

#

not to start

slate trellis
#

what is a build system

echo phoenix
#

it just makes it much easier to work with other plugins and libraries later

slate trellis
#

ah