Config file changing automatically?

Discussion in 'Plugin Development' started by 04hockey, May 1, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    04hockey

    Hey guys, my plugin has a config file, and one of the fields is an item id. By default, this id is 322, however I made it so that a person can add byte data to an item (ex. 322:1). However, once I do this and reload the plugin, for some reason 322:1 changes to 19321. I don't understand why this is happening, can you help me?

    Heres my config init:

    Code:java
    1. config = getConfig();
    2. config.options().copyDefaults(true);
    3. saveConfig();
     
  2. Offline

    Superckl1

    Remove copyDefaults. It overwrites the config on the disk with the one in your jar.
     
  3. Offline

    04hockey

    Doesn't matter if I do that. Whenever I reload my plugin it converts it to a number. It happens with other numbers and values too.
     
  4. Offline

    coasterman10

    Is there any other code getting/setting values in the config?
     
Thread Status:
Not open for further replies.

Share This Page