Search in sources :

Example 1 with ConfigManager

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

the class ZonePool method getBaseWorkingDir.

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

Example 2 with ConfigManager

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

the class PlayerStateServiceImpl method getFile.

private Path getFile(Player player) throws IOException {
    ConfigManager service = Sponge.getGame().getConfigManager();
    Path path = service.getPluginConfig(SkreePlugin.inst()).getDirectory();
    path = Files.createDirectories(path.resolve("profiles"));
    return path.resolve(player.getUniqueId() + ".json");
}
Also used : Path(java.nio.file.Path) ConfigManager(org.spongepowered.api.config.ConfigManager)

Example 3 with ConfigManager

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

the class ForgeState method getPersistenceFile.

private static Path getPersistenceFile() throws IOException {
    ConfigManager service = Sponge.getGame().getConfigManager();
    Path path = service.getPluginConfig(SkreePlugin.inst()).getDirectory();
    path = Files.createDirectories(path.resolve("forge"));
    return path.resolve("resources.json");
}
Also used : Path(java.nio.file.Path) ConfigManager(org.spongepowered.api.config.ConfigManager)

Example 4 with ConfigManager

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

the class MarketSystem method getMarketStateFile.

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

Example 5 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)

Aggregations

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