运行类属性
RUNTIME_AFTER
需要重写的方法
JavaScript中onEnable(attr)onRuntimeAfter(attr, entity, handler)
Groovy中onEnable()onRuntimeAfter(entity, handler)
参数解释
attr: 属性本身,JsAttribute 对象(仅 JavaScript)entity: 运行者,Player 对象handler: 属性处理器,UpdateAfterHandler 对象
处理器实现的接口
AttributeHandler AttributeTracker MetadataTracker
示例
JavaScript
Groovy
