跳到主要内容

附加功能

世界边界

自定义世界边界系统,支持动画过渡效果。

通过命令管理:

/kml worldborder create <世界> <大小>     # 创建边界
/kml worldborder center <世界> <x> <z> # 设置中心点
/kml worldborder move <世界> <大小> <时间> # 动画过渡到新大小
/kml worldborder size <世界> <大小> # 直接设置大小
/kml worldborder reset <世界> # 重置边界
/kml worldborder damage <世界> <伤害值> # 设置边界外伤害

边界伤害间隔在 config.yml 中配置:

borderDamagePeriod: 1000

单位毫秒,默认 1000(1 秒触发一次伤害)。

全息文字

基于 Adyeshach 的全息文字系统,支持公共/私有显示、打字机效果和物品展示。

前置要求

需要安装 Adyeshach 插件。

通过命令管理:

/kml holo <子命令>

全息文字支持 {item:<来源:ID>} 语法在文字中展示物品图标,例如:

{item:mm:SkeletonKingSword}
{item:zap:Gem}

显示模式:

  • 公共全息 — 所有玩家可见
  • 私有全息 — 仅特定玩家可见
  • 打字机效果(printer) — 文字逐字显示
  • 静态显示(static) — 普通固定文字

在 Kether 脚本中也可以通过 kml holo 动作操作全息文字。

掉落物归属

掉落物归属系统让通过 evel drop 掉落的物品带有归属标记,只有归属玩家能拾取。

config.yml 中配置:

onDropItemOwner: false
showOwnerName:
enable: true
format: "{name} &7({owner})"
merge: false
  • onDropItemOwner — 总开关,设为 true 启用归属系统
  • showOwnerName.enable — 是否在掉落物名称上显示归属信息
  • showOwnerName.format — 显示格式,{name} 为物品名,{owner} 为归属玩家名
  • showOwnerName.merge — 是否允许同归属的掉落物合并

在 Kether 中使用 owner 参数指定归属:

evel drop "zap:Gem" amount 1 to ~,~,~+2,~ chance 100 owner "Steve"

PlaceholderAPI 支持

插件提供 PAPI 变量,可以在任何支持 PlaceholderAPI 的地方执行 Kether 脚本。

变量格式:

%kmlparse_<kether脚本>%

kmlparse 是默认前缀,可在 config.yml 中修改:

papi_parse:
symbol: "kmlparse"

示例:

%kmlparse_node "def4"%
前置要求

需要安装 PlaceholderAPI 插件。

Fluxon 脚本引擎支持

KetherModulesLite 支持双脚本引擎:Kether 和 Fluxon。

Fluxon 脚本组配置在 run_fluxon.yml 中,格式与 run_kether.yml 相同。

在 Kether 中通过 frun 动作执行 Fluxon 脚本组:

frun r <组名>        # 随机执行
frun w <组名> # 权重执行

通过命令执行:

/kml run <组名>

脚本组系统

run_kether.yml 定义可复用的 Kether 脚本组,支持两种执行模式。

random 模式 — 随机执行

run 列表中随机选取脚本执行:

random:
def1:
if: true
chance: 100.0
count: 2
run:
- 'tell 1'
- |-
tell 2
- |-
if perm vip then {
tell 3
}
deny: |-
不允许执行
  • if — 执行条件(Kether 表达式)
  • chance — 执行概率(0-100)
  • count — 从列表中随机选取的数量
  • run — 脚本列表
  • deny — 条件不满足时执行的脚本

weight 模式 — 权重执行

按权重随机选取脚本执行:

weight:
def1:
if: "perm vip"
count: 2
groups:
- weight: 2
run: |-
tell 1
- weight: 2
run: |-
tell 2
deny: |-
不允许执行
  • groups — 带权重的脚本组
  • weight — 权重值,越大被选中概率越高

在 Kether 中调用:

krun r def1        # random 模式执行 def1
krun w def1 # weight 模式执行 def1

DragonCore / GermPlugin 联动

插件支持与 DragonCore 和 GermPlugin 进行联动,可在 Kether 脚本中调用相关功能。

Chemdah 联动

通过 chs / chscript 动作执行 Chemdah workspace 脚本:

chs <脚本名>
前置要求

需要安装 Chemdah 插件。

首次加入事件

player.yml 中配置玩家首次加入服务器时执行的脚本:

first_player_join: |-
kml setblock at "world,0,80,0" stone
tell "你是第一个进入服务器的玩家"

通过 /kml resetFirstJoin <玩家> 可重置玩家的首次加入标记,让该玩家下次登录时再次触发。