docs: 更新文档

This commit is contained in:
2024-03-04 20:47:57 +08:00
parent d3bed3e822
commit e40378712a

View File

@@ -2,6 +2,8 @@
为 Minecraft 服务器引入 JavaScript 脚本执行功能
使用的脚本引擎为 [OpenJDK Nashorn](https://github.com/openjdk/nashorn)
# 指令
> JavaScript 代码执行时,执行命令的对象(玩家或控制台)会作为 sender 变量传入
@@ -16,4 +18,10 @@
# 注意事项
默认情况下禁止使用 `/script eval {脚本内容}` 指令。
如有需要,可以在 `config.yml` 中将 `enable-eval-command` 设置为 `true` 并重载插件以启用该子指令。
如有需要,可以在 `config.yml` 中将 `enable-eval-command` 设置为 `true` 并重载插件以启用该子指令。
# nashorn 学习资料
- [介绍 Nashorn —— Java 8 JavaScript 引擎](https://mouse0w0.github.io/2018/12/02/Introduction-to-Nashorn/)
- [Oracle Nashorn面向 JVM 的下一代 JavaScript 引擎
](https://www.oracle.com/technical-resources/articles/java/jf14-nashorn.html)