Search in sources :

Example 6 with ConfigManager

use of org.spongepowered.api.config.ConfigManager in project Skree by Skelril.

the class Decorators method getBaseWorkingDir.

private static Path getBaseWorkingDir() {
    ConfigManager service = Sponge.getGame().getConfigManager();
    Path path = service.getPluginConfig(SkreePlugin.inst()).getDirectory();
    try {
        return Files.createDirectories(path.resolve("zones"));
    } catch (IOException e) {
        e.printStackTrace();
    }
    return null;
}
Also used : Path(java.nio.file.Path) IOException(java.io.IOException) ConfigManager(org.spongepowered.api.config.ConfigManager)

Example 7 with ConfigManager

use of org.spongepowered.api.config.ConfigManager in project Skree by Skelril.

the class ConfigLoader method getFile.

private static Path getFile(String configName) throws IOException {
    ConfigManager service = Sponge.getGame().getConfigManager();
    Path path = service.getPluginConfig(SkreePlugin.inst()).getDirectory();
    return path.resolve(configName);
}
Also used : Path(java.nio.file.Path) ConfigManager(org.spongepowered.api.config.ConfigManager)

Aggregations

Path (java.nio.file.Path)7 ConfigManager (org.spongepowered.api.config.ConfigManager)7 IOException (java.io.IOException)1