Launcher/LauncherAPI/src/main/java/pro/gravit/launcher/modules/ModulesConfigManager.java

24 lines
771 B
Java
Raw Normal View History

package pro.gravit.launcher.modules;
2019-01-12 03:13:24 +03:00
import pro.gravit.launcher.config.SimpleConfigurable;
2019-01-12 03:13:24 +03:00
import java.nio.file.Path;
public interface ModulesConfigManager {
2019-01-12 03:13:24 +03:00
Path getModuleConfig(String moduleName);
2019-01-15 06:35:39 +03:00
Path getModuleConfig(String moduleName, String configName);
2019-01-12 03:13:24 +03:00
Path getModuleConfigDir(String moduleName);
<T> SimpleConfigurable<T> getConfigurable(Class<T> tClass, Path configPath);
2019-10-19 19:46:04 +03:00
default <T> SimpleConfigurable<T> getConfigurable(Class<T> tClass, String moduleName) {
return getConfigurable(tClass, getModuleConfig(moduleName));
}
2019-10-19 19:46:04 +03:00
default <T> SimpleConfigurable<T> getConfigurable(Class<T> tClass, String moduleName, String configName) {
return getConfigurable(tClass, getModuleConfig(moduleName, configName));
}
2019-01-12 03:13:24 +03:00
}