From f3fb552a8d7cae8b6c7f27bec9aced984ff30597 Mon Sep 17 00:00:00 2001 From: mingjun97 Date: Sat, 23 Jul 2022 17:54:21 -0700 Subject: [PATCH] Adapt upstream breaking changes Thanks @liaomsn for helping me test on the latest grasscutter Co-Authored-By: liaomsn <37428863+liaomsn@users.noreply.github.com> --- README.md | 5 +++-- gc-plugin/build.gradle | 2 +- .../main/java/com/mojo/consoleplus/ConsolePlus.java | 4 ++-- .../com/mojo/consoleplus/command/PluginCommand.java | 12 +++++++++--- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 1de191d..09c972a 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,9 @@ MojoConsolePlus(MCP) is a [Grasscutter](https://github.com/Grasscutters/Grasscut | Grasscutter version | MojoConsole version | | ------------------- | ------------------- | -| 1.2.1-dev | 1.2.0-dev | -| 1.2.2-dev | 1.3.0-dev | +| 1.2.1-dev | [1.2.0-dev](https://github.com/gc-mojoconsole/gc-mojoconsole-backend/releases/tag/dev-1.2.0) | +| 1.2.2-dev | [1.3.0-dev](https://github.com/gc-mojoconsole/gc-mojoconsole-backend/releases/tag/dev-1.3.0) | +| 1.2.3-dev | [1.4.0-dev](https://github.com/gc-mojoconsole/gc-mojoconsole-backend/releases/tag/dev-1.4.0) | ## Currently Features: - [x] Send console link in game diff --git a/gc-plugin/build.gradle b/gc-plugin/build.gradle index 39a6012..bafc957 100644 --- a/gc-plugin/build.gradle +++ b/gc-plugin/build.gradle @@ -19,7 +19,7 @@ plugins { sourceCompatibility = 17 targetCompatibility = 17 -def version_tag = "dev-1.3.0" +def version_tag = "dev-1.4.0" repositories { mavenCentral() diff --git a/gc-plugin/src/main/java/com/mojo/consoleplus/ConsolePlus.java b/gc-plugin/src/main/java/com/mojo/consoleplus/ConsolePlus.java index b39708e..70048f7 100644 --- a/gc-plugin/src/main/java/com/mojo/consoleplus/ConsolePlus.java +++ b/gc-plugin/src/main/java/com/mojo/consoleplus/ConsolePlus.java @@ -14,8 +14,8 @@ import com.mojo.consoleplus.command.PluginCommand; import io.javalin.http.staticfiles.Location; import emu.grasscutter.plugin.PluginConfig; -import static emu.grasscutter.Configuration.PLUGIN; -import static emu.grasscutter.Configuration.HTTP_POLICIES; +import static emu.grasscutter.config.Configuration.PLUGIN; +import static emu.grasscutter.config.Configuration.HTTP_POLICIES; import com.mojo.consoleplus.config.MojoConfig; diff --git a/gc-plugin/src/main/java/com/mojo/consoleplus/command/PluginCommand.java b/gc-plugin/src/main/java/com/mojo/consoleplus/command/PluginCommand.java index d6bbabc..3f2a90d 100644 --- a/gc-plugin/src/main/java/com/mojo/consoleplus/command/PluginCommand.java +++ b/gc-plugin/src/main/java/com/mojo/consoleplus/command/PluginCommand.java @@ -10,14 +10,20 @@ import emu.grasscutter.command.Command; import emu.grasscutter.command.CommandHandler; import emu.grasscutter.game.mail.Mail; import emu.grasscutter.game.player.Player; -import static emu.grasscutter.Configuration.*; +import static emu.grasscutter.config.Configuration.*; import com.mojo.consoleplus.ConsolePlus; import com.google.gson.Gson; import emu.grasscutter.BuildConfig; -@Command(label = "mojoconsole", usage = "mojoconsole", description = "Send Mojoconsole link via mail (by default it's in-game webview, but you may use argument `o` for popping out external browser)", aliases = { - "mojo" }, permission = "mojo.console") +@Command(label = "mojoconsole", + usage = { + "", + "o" + }, + aliases = {"mojo" }, + permission = "mojo.console" + ) public class PluginCommand implements CommandHandler { static class HashParams{ public String k2; // session key