Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ConfigManager {
- List<Config> configs = new ArrayList<>();
- public ConfigManager() {
- add(new ConfigLoader());
- add(new ConfigSaver());
- if (!Files.exists(Paths.get("./NoWay"))) {
- try {
- Files.createDirectory(Paths.get("./NoWay"));
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
- private void add(Config config) {
- this.configs.add(config);
- }
- public void call(Config.ConfigType configType) {
- for (Config config : this.configs) {
- if (config.type.equals(configType)) {
- config.call((ArrayList) NoWay.modules);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment