Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
9f35b1e64d | |||
c4c09fcbb5 |
@@ -18,7 +18,7 @@ jobs:
|
|||||||
distribution: temurin
|
distribution: temurin
|
||||||
cache: gradle
|
cache: gradle
|
||||||
- name: Build Project
|
- name: Build Project
|
||||||
run: chmod +x gradlew && ./gradlew build --no-daemon
|
run: chmod +x gradlew && ./gradlew build --console plain --no-daemon
|
||||||
- name: Publish to Release
|
- name: Publish to Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
|
12
README.md
12
README.md
@@ -1,6 +1,7 @@
|
|||||||
# hamster-script
|
# HamsterScript
|
||||||
|
|
||||||
为Minecraft服务器导入 [Nashorn](https://github.com/openjdk/nashorn) 引擎来执行 JavaScript 脚本
|
HamsterScript 通过为 Minecraft 服务器导入 Nashorn 引擎,来允许用户执行 JavaScript 脚本。
|
||||||
|
这个插件主要用于提供调试功能。
|
||||||
|
|
||||||
# 手动构建
|
# 手动构建
|
||||||
|
|
||||||
@@ -9,8 +10,6 @@
|
|||||||
3. 命令行窗口中执行`./gradlew clean build`
|
3. 命令行窗口中执行`./gradlew clean build`
|
||||||
4. 构建成品在 `build` 文件夹
|
4. 构建成品在 `build` 文件夹
|
||||||
|
|
||||||
也可访问我的 [Jenkins网站](https://jenkins.airgame.net/job/opensource/job/hamster-script/) 获取最新版
|
|
||||||
|
|
||||||
# 指令
|
# 指令
|
||||||
|
|
||||||
> JavaScript 代码执行时,执行命令的对象(玩家或控制台)会作为 sender 变量传入
|
> JavaScript 代码执行时,执行命令的对象(玩家或控制台)会作为 sender 变量传入
|
||||||
@@ -26,8 +25,7 @@
|
|||||||
默认情况下禁止使用 `/script eval {脚本内容}` 指令。
|
默认情况下禁止使用 `/script eval {脚本内容}` 指令。
|
||||||
如有需要,可以在 `config.yml` 中将 `enable-eval-command` 设置为 `true` 并重载插件以启用该子指令。
|
如有需要,可以在 `config.yml` 中将 `enable-eval-command` 设置为 `true` 并重载插件以启用该子指令。
|
||||||
|
|
||||||
# nashorn 学习资料
|
# Nashorn 学习资料
|
||||||
|
|
||||||
- [介绍 Nashorn —— Java 8 JavaScript 引擎](https://mouse0w0.github.io/2018/12/02/Introduction-to-Nashorn/)
|
- [介绍 Nashorn —— Java 8 JavaScript 引擎](https://mouse0w0.github.io/2018/12/02/Introduction-to-Nashorn/)
|
||||||
- [Oracle Nashorn:面向 JVM 的下一代 JavaScript 引擎
|
- [Oracle Nashorn:面向 JVM 的下一代 JavaScript 引擎](https://www.oracle.com/technical-resources/articles/java/jf14-nashorn.html)
|
||||||
](https://www.oracle.com/technical-resources/articles/java/jf14-nashorn.html)
|
|
||||||
|
@@ -9,7 +9,7 @@ base {
|
|||||||
|
|
||||||
group = "cn.hamster3.mc.plugin"
|
group = "cn.hamster3.mc.plugin"
|
||||||
version = "1.1.0"
|
version = "1.1.0"
|
||||||
description = "为Minecraft服务器导入 Nashorn 引擎来执行 JavaScript 脚本"
|
description = "为 Minecraft 服务器导入 Nashorn 引擎来执行 JavaScript 脚本"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
|
@@ -12,7 +12,7 @@ UPDATE_CHECKER:
|
|||||||
CHECK_TYPE: GITEA_RELEASES
|
CHECK_TYPE: GITEA_RELEASES
|
||||||
GIT_BASE_URL: https://git.airgame.net
|
GIT_BASE_URL: https://git.airgame.net
|
||||||
GIT_REPO: MiniDay/hamster-script
|
GIT_REPO: MiniDay/hamster-script
|
||||||
DOWNLOAD_URL: https://jenkins.airgame.net/job/opensource/job/hamster-script/
|
DOWNLOAD_URL: https://git.airgame.net/MiniDay/hamster-script/releases
|
||||||
|
|
||||||
Plugin:
|
Plugin:
|
||||||
# HamsterScript 需要访问其他插件的类路径
|
# HamsterScript 需要访问其他插件的类路径
|
||||||
|
Reference in New Issue
Block a user