mirror of
https://github.com/ViaVersion/ViaFabric.git
synced 2024-12-18 15:47:46 +01:00
Implement getDataFolder (#14)
This commit is contained in:
parent
ab07f5db97
commit
a775941152
@ -57,6 +57,8 @@ import us.myles.ViaVersion.util.GsonUtil;
|
||||
import us.myles.viaversion.libs.gson.JsonObject;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.io.File;
|
||||
import java.nio.file.Path;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
@ -67,7 +69,14 @@ import java.util.logging.Logger;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class VRPlatform implements ViaPlatform {
|
||||
private VRViaConfig config = new VRViaConfig(FabricLoader.getInstance().getConfigDirectory().toPath().resolve("ViaFabric").resolve("viaversion.yml").toFile());
|
||||
private VRViaConfig config;
|
||||
private File dataFolder;
|
||||
|
||||
public VRPlatform() {
|
||||
Path configDir = FabricLoader.getInstance().getConfigDirectory().toPath().resolve("ViaFabric");
|
||||
config = new VRViaConfig(configDir.resolve("viaversion.yml").toFile());
|
||||
dataFolder = configDir.toFile();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static MinecraftServer getServer() {
|
||||
@ -272,6 +281,11 @@ public class VRPlatform implements ViaPlatform {
|
||||
return config;
|
||||
}
|
||||
|
||||
@Override
|
||||
public File getDataFolder() {
|
||||
return dataFolder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReload() {
|
||||
// Nothing to do
|
||||
|
Loading…
Reference in New Issue
Block a user