Launcher/LauncherAPI/src/main/java/pro/gravit/launcher/modules/ModulesConfigManager.java
2019-10-19 23:46:16 +07:00

23 lines
771 B
Java

package pro.gravit.launcher.modules;
import pro.gravit.launcher.config.SimpleConfigurable;
import java.nio.file.Path;
public interface ModulesConfigManager {
Path getModuleConfig(String moduleName);
Path getModuleConfig(String moduleName, String configName);
Path getModuleConfigDir(String moduleName);
<T> SimpleConfigurable<T> getConfigurable(Class<T> tClass, Path configPath);
default <T> SimpleConfigurable<T> getConfigurable(Class<T> tClass, String moduleName) {
return getConfigurable(tClass, getModuleConfig(moduleName));
}
default <T> SimpleConfigurable<T> getConfigurable(Class<T> tClass, String moduleName, String configName) {
return getConfigurable(tClass, getModuleConfig(moduleName, configName));
}
}