You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am trying to set values after loading a config but the new values are not being set, my code:
No exception is thrown, the file seems to be modified as the date changes, but the configuration values do not.
The text was updated successfully, but these errors were encountered:
How do you load/create your config file?
And what getConfig() returns? An instance of YamlFile?
Also you do not need to load the file again after saving.
Use get("parkour.start-location") to see if the value has changed after set (or getString if location is a string).
Loading values are only needed the first time, when the plugin starts, and optionally on plugin reload.
I'm closing this issue since there are no further details to help you and I think is not an issue with this library.
I'm guessing you have two different configuration instances and you are confused setting values on one and saving another configuration without those values set. Ensure getConfig() returns the same yamlFile instance as in your save / reload methods, and that those methods are actually executed, and getConfiguration() does not return another different configuration instance instead.
LobbyPlugin.getInstance().getConfig() == LobbyPlugin.getInstance().getConfiguration().yamlFile should return true (same instance).
Otherwise, maybe you are confusing the Bukkit's plugin configuration with the configuration instance of this library (YamlFile)? Please don't mix them, use one or another. This library is independent of Bukkit / Spigot / Velocity and can also be used in any Java program.
Hello, I am trying to set values after loading a config but the new values are not being set, my code:
![image](https://user-images.githubusercontent.com/101154133/228726035-cfde6ef5-952d-431b-b80c-816216eaa09b.png)
![image](https://user-images.githubusercontent.com/101154133/228726084-513e5ac6-8e8d-4fff-967d-8d7a7aff08f8.png)
No exception is thrown, the file seems to be modified as the date changes, but the configuration values do not.
The text was updated successfully, but these errors were encountered: