From c73b3d1665ae9d612524efe45f3dbe4b7ed68b63 Mon Sep 17 00:00:00 2001 From: coooookies <1164557342@qq.com> Date: Tue, 3 May 2022 16:09:49 +0800 Subject: [PATCH] read the plugin directory from the config file --- src/main/java/io/github/gmw/module/ConfigParser.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/github/gmw/module/ConfigParser.java b/src/main/java/io/github/gmw/module/ConfigParser.java index a91d1af..091d726 100644 --- a/src/main/java/io/github/gmw/module/ConfigParser.java +++ b/src/main/java/io/github/gmw/module/ConfigParser.java @@ -9,6 +9,7 @@ import java.util.Calendar; import com.google.gson.Gson; import com.google.gson.GsonBuilder; +import emu.grasscutter.Grasscutter; import io.github.gmw.MeaMailPlusCore; import io.github.gmw.config.MeaMailConfig; import io.github.gmw.config.MeaMailTemplate; @@ -16,7 +17,7 @@ import io.github.gmw.config.MeaMailTemplate; public class ConfigParser { private MeaMailConfig config; private ArrayList templates; - private final String configPath = "./plugins/MeaMailPlus"; + private final String configPath = Grasscutter.getConfig().PLUGINS_FOLDER + "MeaMailPlus"; private final String templatePath = this.configPath + "/template"; private final File configFile = new File( this.configPath + "/config.json"); private static final Gson gson = new GsonBuilder().setPrettyPrinting().create();