feat: 允许使用JavaScript监听事件

This commit is contained in:
2024-08-08 07:21:50 +08:00
parent f2ed45b524
commit 41146a74be
9 changed files with 379 additions and 190 deletions

View File

@@ -2,11 +2,10 @@
plugins {
id("java")
id("com.github.johnrengelman.shadow") version "8+"
}
group = "cn.hamster3.mc.plugin"
version = "1.0.6"
version = "1.1.0"
description = "为Minecraft服务器导入 Nashorn 引擎来执行 JavaScript 脚本"
repositories {
@@ -23,9 +22,6 @@ dependencies {
annotationProcessor("org.projectlombok:lombok:1.18.30")
compileOnly("org.spigotmc:spigot-api:1.18.2-R0.1-SNAPSHOT")
// https://mvnrepository.com/artifact/org.openjdk.nashorn/nashorn-core
implementation("org.openjdk.nashorn:nashorn-core:15.4")
}
tasks {
@@ -43,9 +39,6 @@ tasks {
jar {
destinationDirectory = rootProject.layout.buildDirectory
}
shadowJar {
destinationDirectory = rootProject.layout.buildDirectory
}
withType<JavaCompile>().configureEach {
options.encoding = "UTF-8"
}
@@ -54,7 +47,4 @@ tasks {
from(rootProject.file("LICENSE"))
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
build {
dependsOn(shadowJar)
}
}