Created
October 31, 2018 01:59
-
-
Save mworzala/da94d653a32860efdd0837089e28e384 to your computer and use it in GitHub Desktop.
Good Config Thing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface ConfigTemplate { | |
ConfigurationNode template(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment