Skip to content

Commit

Permalink
6.3及其以上版本是针对割草机1.2.3-dev #70ce93b最新版本的一个修复
Browse files Browse the repository at this point in the history
  • Loading branch information
liujiaqi7998 committed Sep 2, 2022
1 parent 3e85385 commit 527d751
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -6,6 +6,8 @@

**更新说明**

2022年9月2日 6.3及其以上版本是针对割草机1.2.3-dev #70ce93b最新版本的一个修复

2022年8月26日 6.2及其以上版本是针对割草机1.2.3-dev分支最新版本的一个修复

2022年8月1日 6.1及其以上版本是针对割草机1.2.3-dev分支最新版本
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Expand Up @@ -6,7 +6,7 @@

<groupId>top.cyqi</groupId> <!-- Replace with your groupId -->
<artifactId>GrasscuttersWebDashboard</artifactId> <!-- Replace with your plugin name. -->
<version>6.2.0</version> <!-- The template's version corresponds to the latest API version. -->
<version>6.3.0</version> <!-- The template's version corresponds to the latest API version. -->

<properties>
<maven.compiler.source>17</maven.compiler.source>
Expand All @@ -30,7 +30,7 @@
<artifactId>grasscutter</artifactId>
<scope>system</scope>
<version>dev-79323a0</version>
<systemPath>${project.basedir}/lib/grasscutter-1.2.3-dev-79323a0.jar</systemPath>
<systemPath>${project.basedir}/lib/grasscutter-1.2.3-dev-70ce93b.jar</systemPath>
</dependency>
<!-- <dependency>-->
<!-- <groupId>xyz.grasscutters</groupId>-->
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/top/cyqi/GrasscuttersWebDashboard.java
Expand Up @@ -2,6 +2,7 @@

import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.read.ListAppender;
import com.google.gson.Gson;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.command.CommandMap;
import emu.grasscutter.config.ConfigContainer;
Expand All @@ -12,13 +13,12 @@
import emu.grasscutter.server.event.game.ServerTickEvent;
import emu.grasscutter.server.game.GameServer;
import emu.grasscutter.server.http.HttpServer;
import emu.grasscutter.config.ConfigContainer;
import top.cyqi.PluginCommand.tpmPluginCommand;
import top.cyqi.handlers.ServerTickHandler;
import top.cyqi.utils.Utils;
import top.cyqi.PluginCommand.webtoolsPluginCommand;
import top.cyqi.utils.PluginConfig;
import top.cyqi.handlers.ServerTickHandler;
import top.cyqi.handlers.WebConsoleListAppender;
import top.cyqi.utils.PluginConfig;
import top.cyqi.utils.Utils;
import top.cyqi.utils.WebUtils;
import top.cyqi.websocket.WebSocketServer;
import top.cyqi.websocket.json.BaseData;
Expand Down Expand Up @@ -63,7 +63,7 @@ public void onLoad() {
}
}
// Put the configuration into an instance of the config class.
this.configuration = Grasscutter.getGsonFactory().fromJson(new FileReader(config), PluginConfig.class);
this.configuration = new Gson().fromJson(new FileReader(config), PluginConfig.class);
} catch (IOException exception) {
Grasscutter.getLogger().error("[WEB控制台] 配置文件读取错误", exception);
return;
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/top/cyqi/websocket/WebSocketServer.java
@@ -1,5 +1,6 @@
package top.cyqi.websocket;

import com.google.gson.Gson;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.game.player.Player;
import io.javalin.Javalin;
Expand Down Expand Up @@ -72,7 +73,7 @@ public void start() {

WsMsg wsMsg;
try {
wsMsg = Grasscutter.getGsonFactory().fromJson(Ws_Msg, WsMsg.class);
wsMsg = new Gson().fromJson(Ws_Msg, WsMsg.class);
} catch (Exception e) {
wsMessageContext.send(new WSData("tip", "消息格式处理异常"));
e.printStackTrace();
Expand Down Expand Up @@ -107,7 +108,7 @@ public void start() {
String Ws_Msg = wsMessageContext.message();
WsMsg wsMsg;
try {
wsMsg = Grasscutter.getGsonFactory().fromJson(Ws_Msg, WsMsg.class);
wsMsg = new Gson().fromJson(Ws_Msg, WsMsg.class);
} catch (Exception e) {
wsMessageContext.send(new WSData("tip", "消息格式处理异常"));
e.printStackTrace();
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.json
@@ -1,7 +1,7 @@
{
"name": "GrasscuttersWebDashboard",
"description": "小奇 Grasscutter 工具箱",
"version": "6.2.0",
"version": "6.3.0",
"authors": [ "666Qi"],
"mainClass": "top.cyqi.GrasscuttersWebDashboard"
}

0 comments on commit 527d751

Please sign in to comment.