build: 优化构建脚本

This commit is contained in:
2023-10-23 19:04:24 +08:00
parent 433b6f2c05
commit a540b9091c
3 changed files with 11 additions and 2 deletions

View File

@@ -1,8 +1,10 @@
@file:Suppress("GradlePackageVersionRange")
evaluationDependsOn(":ball-common")
dependencies {
api(project(":ball-common")) { isTransitive = false }
compileOnly("org.spigotmc:spigot-api:+")
compileOnly("org.spigotmc:spigot-api:1.20.2-R0.1-SNAPSHOT")
compileOnly("cn.hamster3.mc.plugin:core-bukkit:+")
compileOnly("me.clip:placeholderapi:+") { isTransitive = false }

View File

@@ -29,7 +29,7 @@ public class HamsterBallPlugin extends Plugin {
logger.info("已初始化 BallAPI.");
} catch (Exception e) {
e.printStackTrace();
ProxyServer.getInstance().stop();
ProxyServer.getInstance().stop("由于 HamsterBall 未能成功连接, 服务器将立即关闭.");
}
long time = System.currentTimeMillis() - start;
logger.info("仓鼠球初始化完成,总计耗时 " + time + " ms.");

View File

@@ -1,3 +1,10 @@
pluginManagement {
repositories {
maven {
url = uri("https://maven.airgame.net/maven-public/")
}
}
}
rootProject.name = "hamster-ball"
include("ball-bukkit")
include("ball-common")