Create CustomYML.java

Try this out, create an instance of it wherever you like in your main class:

CustomYML data = new CustomYML(this, "data.yml");

You can then write using:

data.getConfig().set(myList);