perf: 优化性能

This commit is contained in:
2023-06-02 15:54:41 +08:00
parent 0ca763ebdb
commit 9c5c8e77ff
5 changed files with 2 additions and 10 deletions

View File

@@ -8,10 +8,6 @@ dependencies {
//noinspection VulnerableLibrariesLocal
compileOnly 'org.spigotmc:spigot-api:1.19.4-R0.1-SNAPSHOT'
// https://mvnrepository.com/artifact/io.netty/netty-all
//noinspection GradlePackageUpdate
shade 'io.netty:netty-all:4.1.86.Final'
compileOnly "cn.hamster3.mc.plugin.core:bukkit:${hamster_core_version}"
compileOnly "me.clip:placeholderapi:2.11.2" transitive false
}

View File

@@ -32,7 +32,6 @@ public class HamsterBallPlugin extends JavaPlugin {
logger.info("BallBukkitAPI 已启动.");
} catch (Exception e) {
e.printStackTrace();
sync(Bukkit::shutdown);
}
}

View File

@@ -57,6 +57,7 @@ public abstract class BallAPI {
@NotNull
private final EventLoopGroup executors;
protected Channel channel;
private boolean enabled;
private boolean connected;

View File

@@ -17,10 +17,6 @@ import java.util.logging.Level;
@ChannelHandler.Sharable
public class BallChannelHandler extends SimpleChannelInboundHandler<String> {
public BallChannelHandler() {
super(true);
}
@Override
protected void channelRead0(ChannelHandlerContext context, String message) {
if ("pong".equals(message)) {

View File

@@ -4,6 +4,7 @@ evaluationDependsOn(':hamster-ball-common')
dependencies {
apiShade project(":hamster-ball-common") transitive false
shade "cn.hamster3.mc.plugin.core:common:${hamster_core_version}"
// // https://mvnrepository.com/artifact/org.slf4j/slf4j-api
// implementation 'org.slf4j:slf4j-api:2.0.3'
@@ -14,7 +15,6 @@ dependencies {
implementationShade 'org.apache.logging.log4j:log4j-slf4j-impl:2.19.0'
// https://mvnrepository.com/artifact/io.netty/netty-all
//noinspection GradlePackageUpdate
implementationShade 'io.netty:netty-all:4.1.86.Final'
// https://mvnrepository.com/artifact/org.yaml/snakeyaml
implementationShade 'org.yaml:snakeyaml:2.0'