I don't understand this line of code.

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();
 

JefferyNor

New Member
I am trying to use the spoiler code here and i dont know what format to use and the help button didnt work.

I found how to do a spoiler but not how to label it.
 
Top