IProjectMC
Member
I'm like a newborn when it comes to nukkit plugin developing and I just want to know what this line of code is. Can someone explain this to me please <3
JavaScript:
Config config = new Config(
new File(this.getDataFolder(), "config.yml"),
Config.YAML,
//Default values (not necessary)
new LinkedHashMap<String, Object>() {
{
put("this-is-a-key", "Hello! Config!");
put("another-key", true); //you can also put other standard objects!
}
});
//Now try to get the value, the default value will be given if the key isn't exist!
this.getLogger().info(String.valueOf(config.get("this-is-a-key", "this-is-default-value")));
//Don't forget to save it!
config.save();