Skip to content
Advertisement

I’m creating a spigot plugin, and the config file that appears on my test server doesn’t match the one in Intellij [closed]

The part of my config file specifically is this:

Players:
  "examplePlayer1":
    - 10
    - 0
  "examplePlayer2":
    - 75
    - 3

That’s what it looks like in Intellij, but when I package the plugin and put it in my test server, the config file looks like this:

Players:
- examplePlayer:
  - 10
  - 0

That’s an older version that didn’t work for a few reasons, so I changed it, but now the new config won’t save to the server.

In my OnEnable method, I have this line: getConfig().options().copyDefaults();

In my OnDisable method, I have: saveConfig();

Does anyone know what I’m doing wrong? Thanks!

Advertisement

Answer

I had to call saveDefaultConfig(); in my OnEnable method… whoops

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement