Merge pull request #6 from omg-xtao/fix

Adapt PR#893 breaking changes
This commit is contained in:
mingjun97 2022-05-17 04:31:14 +08:00 committed by GitHub
commit 9f129b86be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

5
.gitignore vendored
View File

@ -7,4 +7,7 @@
# Ignore Gradle build output directory
build
.vscode
.DS_Store
.DS_Store
# Ignore lib
gc-plugin/lib/

View File

@ -9,7 +9,7 @@ import java.io.File;
import com.mojo.consoleplus.command.PluginCommand;
import io.javalin.http.staticfiles.Location;
import static emu.grasscutter.Configuration.PLUGINS_FOLDER;
import static emu.grasscutter.Configuration.PLUGIN;
import static emu.grasscutter.Configuration.HTTP_POLICIES;
import com.mojo.consoleplus.config.MojoConfig;
@ -24,7 +24,7 @@ public class ConsolePlus extends Plugin{
@Override
public void onEnable() {
String folder_name = PLUGINS_FOLDER + "/mojoconsole/";
String folder_name = PLUGIN("mojoconsole/");
File folder = new File(folder_name);
if (!folder.exists()) {
Grasscutter.getLogger().warn("To make mojo console works, you have to put your frontend file(console.html) inside" + folder.getAbsolutePath());