Better conf dir
This commit is contained in:
@@ -5,6 +5,7 @@ import com.google.gson.Gson;
|
|||||||
import com.google.gson.reflect.TypeToken;
|
import com.google.gson.reflect.TypeToken;
|
||||||
import com.mojang.brigadier.CommandDispatcher;
|
import com.mojang.brigadier.CommandDispatcher;
|
||||||
import com.mojang.brigadier.builder.ArgumentBuilderLiteral;
|
import com.mojang.brigadier.builder.ArgumentBuilderLiteral;
|
||||||
|
import net.fabricmc.loader.api.FabricLoader;
|
||||||
import net.minecraft.core.entity.player.Player;
|
import net.minecraft.core.entity.player.Player;
|
||||||
import net.minecraft.core.net.command.CommandManager;
|
import net.minecraft.core.net.command.CommandManager;
|
||||||
import net.minecraft.core.net.command.CommandSource;
|
import net.minecraft.core.net.command.CommandSource;
|
||||||
@@ -22,7 +23,8 @@ import java.util.Map;
|
|||||||
public class HomeCommand implements CommandManager.CommandRegistry, ModInitializer {
|
public class HomeCommand implements CommandManager.CommandRegistry, ModInitializer {
|
||||||
private static final Map<String, double[]> homes = new HashMap<>();
|
private static final Map<String, double[]> homes = new HashMap<>();
|
||||||
private static final Gson gson = new Gson();
|
private static final Gson gson = new Gson();
|
||||||
private static final File homesFile = new File("homes.json");
|
private static final File homesFile =
|
||||||
|
new File(FabricLoader.getInstance().getConfigDir().toFile(), "homes.json");
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onInitialize() {
|
public void onInitialize() {
|
||||||
|
|||||||
Reference in New Issue
Block a user