feat: 适配新版API
This commit is contained in:
@@ -8,7 +8,7 @@ dependencies {
|
|||||||
compileOnly 'org.spigotmc:spigot-api:1.12.2-R0.1-SNAPSHOT'
|
compileOnly 'org.spigotmc:spigot-api:1.12.2-R0.1-SNAPSHOT'
|
||||||
|
|
||||||
compileOnly "cn.hamster3.mc.plugin.core:bukkit:${hamster_core_version}"
|
compileOnly "cn.hamster3.mc.plugin.core:bukkit:${hamster_core_version}"
|
||||||
apiShade("me.clip:placeholderapi:2.11.2") { transitive = false }
|
compileOnly("me.clip:placeholderapi:2.11.2") { transitive = false }
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources {
|
processResources {
|
||||||
|
@@ -3,7 +3,7 @@ setArchivesBaseName("HamsterBall-Common")
|
|||||||
dependencies {
|
dependencies {
|
||||||
// https://mvnrepository.com/artifact/com.google.code.gson/gson
|
// https://mvnrepository.com/artifact/com.google.code.gson/gson
|
||||||
//noinspection GradlePackageUpdate
|
//noinspection GradlePackageUpdate
|
||||||
compileOnly 'com.google.code.gson:gson:2.8.0'
|
compileOnly 'com.google.code.gson:gson:2.8.9'
|
||||||
// https://mvnrepository.com/artifact/io.netty/netty-all
|
// https://mvnrepository.com/artifact/io.netty/netty-all
|
||||||
compileOnly 'io.netty:netty-all:4.1.82.Final'
|
compileOnly 'io.netty:netty-all:4.1.82.Final'
|
||||||
|
|
||||||
|
@@ -19,6 +19,7 @@ import cn.hamster3.mc.plugin.core.common.constant.CoreConstantObjects;
|
|||||||
import cn.hamster3.mc.plugin.core.common.data.DisplayMessage;
|
import cn.hamster3.mc.plugin.core.common.data.DisplayMessage;
|
||||||
import com.google.gson.JsonElement;
|
import com.google.gson.JsonElement;
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
|
import com.google.gson.JsonParser;
|
||||||
import com.google.gson.JsonPrimitive;
|
import com.google.gson.JsonPrimitive;
|
||||||
import io.netty.bootstrap.Bootstrap;
|
import io.netty.bootstrap.Bootstrap;
|
||||||
import io.netty.channel.Channel;
|
import io.netty.channel.Channel;
|
||||||
@@ -638,7 +639,7 @@ public abstract class BallAPI {
|
|||||||
statement.setString(1, uuid.toString());
|
statement.setString(1, uuid.toString());
|
||||||
ResultSet set = statement.executeQuery();
|
ResultSet set = statement.executeQuery();
|
||||||
while (set.next()) {
|
while (set.next()) {
|
||||||
JsonObject object = CoreConstantObjects.JSON_PARSER.parse(set.getString("msg")).getAsJsonObject();
|
JsonObject object = JsonParser.parseString(set.getString("msg")).getAsJsonObject();
|
||||||
list.add(new DisplayMessage().fromJson(object));
|
list.add(new DisplayMessage().fromJson(object));
|
||||||
}
|
}
|
||||||
statement.close();
|
statement.close();
|
||||||
|
@@ -18,7 +18,7 @@ dependencies {
|
|||||||
// https://mvnrepository.com/artifact/org.yaml/snakeyaml
|
// https://mvnrepository.com/artifact/org.yaml/snakeyaml
|
||||||
implementationShade 'org.yaml:snakeyaml:1.33'
|
implementationShade 'org.yaml:snakeyaml:1.33'
|
||||||
// https://mvnrepository.com/artifact/com.google.code.gson/gson
|
// https://mvnrepository.com/artifact/com.google.code.gson/gson
|
||||||
implementationShade 'com.google.code.gson:gson:2.10'
|
implementationShade 'com.google.code.gson:gson:2.8.9'
|
||||||
|
|
||||||
|
|
||||||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.0'
|
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.0'
|
||||||
|
Reference in New Issue
Block a user