Skip to content

Instantly share code, notes, and snippets.

@mworzala
Created October 31, 2018 01:59
Show Gist options
  • Save mworzala/da94d653a32860efdd0837089e28e384 to your computer and use it in GitHub Desktop.
Save mworzala/da94d653a32860efdd0837089e28e384 to your computer and use it in GitHub Desktop.
Good Config Thing
public class ConfigManagerOrWhatever {
public ConfigManagerOrWhatever(ConfigTemplate template) {
//RealFile.addnode(template.template()) or whatever this actually looks like in configurate
}
}
// The rest of the methods required for fetching options or whatever.
public class ConfigReal implements ConfigTemplate {
@Override
public ConfigurationNode template() { // This file would go in the individual plugins rather than common
// Create node
// All of our code to add the options/comments
return thatNewNode;
}
}
public interface ConfigTemplate {
ConfigurationNode template();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment