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

26 lines
779 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);
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));
}
2019-01-12 03:13:24 +03:00
}