In regards to what reloadConfig does, below is the body of the method.
public void reloadConfig() {
newConfig = YamlConfiguration.loadConfiguration(configFile);
InputStream defConfigStream = getResource("config.yml");
if (defConfigStream != null) {
YamlConfiguration defConfig = YamlConfiguration.loadConfiguration(defConfigStream);
newConfig.setDefaults(defConfig);
}
}
The first line is clear, it loads the config file, in the data folder. Then it loads from the jar config.yml and sets it as default. --Sagacious Zed 17:32, 23 October 2011 (EST)
- Apparently I didn't notice the first line. I am curious as to why it doesn't seem to work though. --Feildmaster 17:45, 23 October 2011 (EST)
- Possibly an error on user usage. Let me check if he tries to store it incorrectly, when he gets back online --Feildmaster
Reference??[]
I clicked "Configuration API REFERENCE" and it took me to "Introduction..."... I clicked "Bukkit Plugin Getting Started" and it took me to a hello world for java.
WHAT THE HECK IS GOING ON
- It is intentional that the link "Configuration API Reference" links to Introduction_to_the_New_Configuration, as this page, as along with the links to the Javadoc is the only document on this wiki the explains the Configuration API. I am however not able to find the link "Bukkit Plugin Getting Started" --Sagacious Zed 21:57, 4 March 2012 (EST)
BukkitDocs[]
As part of the move into BukkitDocs I propose that the title be changed from Introduction to the New Configuration to Configuration API. The API has matured enough to stop referencing it as the New Configuration API. --Sagacious Zed 23:00, 12 June 2012 (EST)
- I think this is a good idea. Can we do the rename now? -mbaxter 20:21, 29 August 2012 (EST)
@SerializeAs[]
Currently, the article says to use @SerializeAs when creating an alias. The correct annotation appears to be @SerializableAs. - Unsigned comment (Crussell52, 17:27, 17 February 2013 (EST))
- Edited this. If it's clearly right I see no reason to dive in and change it - there's a lot worse in the edit history. Score Under (talk) 08:11, 26 May 2013 (EST)
Duplicate page[]
This page is a duplicate of Configuration_API_Reference.
Depreciated Methods[]
Under the Implementation for Reloading tutorial - same code as discussed above more specifically the following line:
YamlConfiguration defConfig = YamlConfiguration.loadConfiguration(defConfigStream);
Uses the deprecated method YamlConfiguration.loadConfiguration(InputStream) this method has been deprecated in the API. I propose that this should be altered or removed so deprecated methods are not used as a reference point for developers. Personally I feel best practice is to avoid deprecated methods but this will really depend on the community's call.--Arweth (talk) 09:39, 21 May 2014 (UTC)