mirror of
https://github.com/ViaVersion/ViaFabric.git
synced 2024-12-19 15:57:37 +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 us.myles.viaversion.libs.gson.JsonObject;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
import java.io.File;
|
||||||
|
import java.nio.file.Path;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
@ -67,7 +69,14 @@ import java.util.logging.Logger;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class VRPlatform implements ViaPlatform {
|
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
|
@Nullable
|
||||||
public static MinecraftServer getServer() {
|
public static MinecraftServer getServer() {
|
||||||
@ -272,6 +281,11 @@ public class VRPlatform implements ViaPlatform {
|
|||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public File getDataFolder() {
|
||||||
|
return dataFolder;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onReload() {
|
public void onReload() {
|
||||||
// Nothing to do
|
// Nothing to do
|
||||||
|
Loading…
Reference in New Issue
Block a user