Fabric.SK
Fabric.SK 是面向 Fabric 的服务端 Skript 风格脚本引擎。编写可读性强的 .sk 脚本以自动化游戏流程、创建自定义命令、响应事件、管理物品并构建轻量级服务器逻辑——无需玩家安装客户端模组即可实现。
受 Bukkit 的 Skript 启发,Fabric.SK 通过其自身的解析器、AST 引擎和运行时,将基于脚本的自定义功能引入现代 Fabric 生态。
✨ 特性
- ✔ 服务端脚本 —— 无需客户端模组
- ✔ Skript 风格语法 —— 可读的命令、事件、条件和效果
- ✔ 自定义命令 —— 直接在
.sk 脚本中定义命令
- ✔ 事件处理 —— 响应支持的游戏内事件
- ✔ 变量与执行上下文 —— 使用脚本变量和事件上下文
- ✔ 物品定制 —— 创建命名物品并定制支持的物品属性
- ✔ 条件逻辑 —— 使用
if 和 else 控制脚本行为
- ✔ 玩家循环 —— 为在线玩家运行支持的效果和检查
- ✔ 重复脚本 —— 使用支持的时间事件,如
every 1 second
- ✔ 实体与玩家效果 —— 通过脚本使用支持的效果
- ✔ 热重载 —— 无需重启服务器即可重新加载脚本
- ✔ 有序的脚本存储 —— 脚本存储在
config/fabricsk/scripts/ 目录中
Fabric.SK 正在积极开发中。Skript 兼容性和支持的语法可能因版本而异。
? 示例脚本
此示例向玩家发放一把自定义命名的速度之剑,并反复检查他们是否持有该剑。
command /speedsword:
permission: op
trigger:
give player an iron sword named "&eSpeed"
every 1 second:
loop all players:
if loop-player's tool is iron sword named "&eSpeed":
apply effect speed 2 to loop-player for 2 seconds without particles
? 脚本位置
将你的 .sk 脚本放置于:
config/fabricsk/scripts/
使用以下命令重新加载脚本:
/fabricsk reload
可用命令和支持的语法在不同版本之间可能有所差异。
? 路线图
- 更多游戏内事件,包括聊天、死亡和方块交互
- 扩展针对玩家、位置和实体的表达式
- 更多条件和效果
- 改进的变量处理与持久化
- 更广泛的 Skript 语法兼容性
- 添加用于扩展 Fabric.SK 的插件 API
Fabric.SK —— 在 Fabric 中创建脚本。
其他项目
Fabric.SK
Fabric.SK is a server-side Skript-style scripting engine for Fabric. Write readable .sk scripts to automate gameplay, create custom commands, respond to events, manage items, and build lightweight server logic — all without requiring players to install a client-side mod.
Inspired by Bukkit's Skript, Fabric.SK brings script-based customization to the modern Fabric ecosystem with its own parser, AST engine, and runtime.
✨ Features
- ✔ Server-side scripting — no client mod required
- ✔ Skript-style syntax — readable commands, events, conditions, and effects
- ✔ Custom commands — define commands directly in
.sk scripts
- ✔ Event handling — react to supported gameplay events
- ✔ Variables and execution context — work with script variables and event context
- ✔ Item customization — create named items and customize supported item properties
- ✔ Conditional logic — use
if and else to control script behavior
- ✔ Player loops — run supported effects and checks for online players
- ✔ Repeating scripts — use supported timed events such as
every 1 second
- ✔ Entity and player effects — use supported effects through scripts
- ✔ Hot reload — reload scripts without restarting the server
- ✔ Organized script storage — scripts are stored in
config/fabricsk/scripts/
Fabric.SK is under active development. Skript compatibility and supported syntax may vary by version.
? Example Script
This example gives a player a custom-named Speed Sword and repeatedly checks whether they are holding it.
command /speedsword:
permission: op
trigger:
give player an iron sword named "&eSpeed"
every 1 second:
loop all players:
if loop-player's tool is iron sword named "&eSpeed":
apply effect speed 2 to loop-player for 2 seconds without particles
? Script Location
Place your .sk scripts in:
config/fabricsk/scripts/
Reload scripts with:
/fabricsk reload
Available commands and supported syntax may vary between versions.
? Roadmap
- More gameplay events, including chat, death, and block interactions
- Expanded expressions for players, locations, and entities
- More conditions and effects
- Improved variable handling and persistence
- Broader Skript syntax compatibility
- Addon API for extending Fabric.SK
Fabric.SK — Create scripts in Fabric.
Other Projects
评论 0
登录后参与评分
还没有评论,来抢沙发吧