一个用于 Skript 项目的 Java 风格封装器
SkriptModuleLoader 允许你将 Skript (.sk) 文件打包进 Java 插件 JAR 中,使你的 Skript 项目看起来、构建和分发方式都像是一个真正的 Java/Maven 项目。
这解决了常见的 Skript 问题:
- ❌ 脚本被删除或遗忘
- ❌
scripts/ 文件夹杂乱无章
- ❌ 缺乏完善的版本控制或发布机制
- ❌ 难以分发模块化的 Skript 系统
通过本项目,你的 .sk 文件存储在插件 JAR 内部,并在服务器启动时自动提取并加载。
✨ 本项目是什么
可以将 SkriptModuleLoader 视为:
一个将 Skript 转化为 Java 风格项目的封装器
你编写 Skript
➡️ 像 Java 一样打包
➡️ 像插件一样发布
➡️ 自动加载
无需手动复制,也无需困惑。
? 工作原理(概念)
- 你将
.sk 文件放入 Java 项目中
- Maven 将它们打包到插件 JAR 中
- 插件在运行时将它们提取到 Skript 的文件夹中
- Skript 自动重载
? 使用方法
变体 1.
你编译该项目
- 从下载页面下载 .zip 文件并解压。
- 下载 Java 21 和 Maven(如果你还没有的话)。
- 打开
\src\main\resources\modules 并将你的 .sk 文件放在那里(不要使用子文件夹)。
- 打开
\src\main\resources\config.yml,设置 bundled-scripts: 为你之前放置的脚本名称(带 .sk 后缀)。
- 进入项目根目录,运行名为
build.bat 的程序。
- 程序将自动编译插件。
- 将生成的 .jar 文件放入服务器的
\plugins\ 目录中。插件将自动安装并加载脚本。
变体 2.
你通过插件加载 .sk 文件
- 将 .jar 文件下载到服务器的
\plugins\ 目录中。
- 启动一次服务器然后停止。
- 将你的 .sk 文件放入新生成的文件夹
\plugins\SkriptModuleLoader\modules\ 中。
- 启动服务器,观察插件如何将脚本加载到 Skript 的脚本文件夹中。
在变体 2 的情况下,你无法分发该插件。
此外,你可以在编译之前和/或之后编辑 config.yml。
A Java-style wrapper for Skript projects
SkriptModuleLoader lets you package Skript (.sk) files inside a Java plugin JAR, making your Skript project look, build, and distribute like a real Java/Maven project.
This solves common Skript problems:
- ❌ Scripts getting deleted or forgotten
- ❌ Messy
scripts/ folders
- ❌ No proper versioning or releases
- ❌ Hard to distribute modular Skript systems
With this project, your .sk files live inside the plugin JAR, and are automatically extracted and loaded when the server starts.
✨ What This Project Is
Think of SkriptModuleLoader as:
A wrapper that turns Skript into a Java-style project
You write Skript
➡️ Package it like Java
➡️ Release it like a plugin
➡️ Load it automatically
No manual copying. No confusion.
? How It Works (Concept)
- You place
.sk files into the Java project
- Maven bundles them into the plugin JAR
- The plugin extracts them at runtime into Skript’s folder
- Skript reloads automatically
? How to use it
Variant 1.
You compile the project
- Download the .zip file from the downloads page and unzip it.
- Download Java 21 and Maven (if you haven't)
- Open
\src\main\resources\modules and place your .sk files there (no subfolders).
- Open
\src\main\resources\config.yml and set the bundled-scripts: with your script names (with .sk) you placed earlier.
- Go to the root of the project and start program named
build.bat.
- Program will automatically compile the plugin.
- Place the .jar file in
\plugins\ of your server. Plugin will automatically install and load the scripts.
Variant 2.
You load the .sk file through the plugin
- Download the .jar file to
\plugins\ of your server.
- Start the server once and stop.
- Place your .sk files to the newly generated folder
\plugins\SkriptModuleLoader\modules\
- Start the server, and watch how plugin loads to scripts folder in Skript.
You can't distribute the plugin in case of Variant 2.
Additionally you can edit the config.yml before or/and after the compilation.
评论 0
登录后参与评分
还没有评论,来抢沙发吧