move configs to "./config" folder
This commit is contained in:
parent
53c2d1f9b5
commit
e9c6812b92
@ -1,3 +1,7 @@
|
||||
Flan 1.0.5
|
||||
======================
|
||||
- Moved the config files to the run/server root folder. (The place where all other mods configs are too)
|
||||
|
||||
Flan 1.0.4
|
||||
======================
|
||||
- BisUmTo: Add addClaim command to create claims via commands
|
||||
|
@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx2G
|
||||
loader_version=0.9.1+build.205
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.0.4
|
||||
mod_version = 1.0.5
|
||||
maven_group = com.flemmli97.flan
|
||||
archives_base_name = flan
|
||||
|
||||
|
@ -2,6 +2,7 @@ package com.flemmli97.flan.config;
|
||||
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonObject;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
@ -13,6 +14,8 @@ import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
public class Config {
|
||||
|
||||
@ -34,7 +37,8 @@ public class Config {
|
||||
public int permissionLevel = 2;
|
||||
|
||||
public Config(MinecraftServer server) {
|
||||
File configDir = server.getSavePath(WorldSavePath.ROOT).resolve("config/claimConfigs").toFile();
|
||||
File configDir = FabricLoader.getInstance().getConfigDir().resolve("flan").toFile();
|
||||
//.getSavePath(WorldSavePath.ROOT).resolve("config/claimConfigs").toFile();
|
||||
try {
|
||||
if (!configDir.exists())
|
||||
configDir.mkdirs();
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.flemmli97.flan.config;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.WorldSavePath;
|
||||
|
||||
@ -76,7 +77,8 @@ public class LangConfig {
|
||||
public String claimGroupPlayers = " Players: %s";
|
||||
|
||||
public LangConfig(MinecraftServer server) {
|
||||
File configDir = server.getSavePath(WorldSavePath.ROOT).resolve("config/claimConfigs").toFile();
|
||||
File configDir = FabricLoader.getInstance().getConfigDir().resolve("flan").toFile();
|
||||
//server.getSavePath(WorldSavePath.ROOT).resolve("config/claimConfigs").toFile();
|
||||
try {
|
||||
if (!configDir.exists())
|
||||
configDir.mkdirs();
|
||||
|
Loading…
Reference in New Issue
Block a user