Skip to content

事件 API ​

Cooking 公开 4 个同步 Bukkit 事件; 不同 fire 点的 owner 检查与覆盖范围不能互相替代

事件触发时机线程Cancellable可修改字段取消/结果效果
CookingStationInteractEvent已识别且启用的七类工位交互, 在对应 handleInteraction 前玩家/位置 owner thread否无通知事件, 不阻止工位逻辑; 并由 tracker 记录 recent station
CookingRecipeCompleteEvent共享奖励出口中, 输出和 completion actions 交付前global-region owner thread; 无法拥有时跳过事件而继续既定奖励流是dropResult取消阻止输出和 completion actions
PlayerNutritionConsumeEvent支持的 vanilla/MMOItems/NeigeItems 食物来源聚合后, 营养与 source actions 应用前玩家 owner thread是无阻止 EmakiCooking 营养/actions, 但不撤销底层消费行为
NutritionThresholdChangeEventsingle/combo 阈值的 met 状态发生边沿变化后玩家 owner thread否无post 通知, 不可回滚状态或动作

自动工位完成时 CookingRecipeCompleteEvent.getPlayer() 可为 null. dropResult 只改变输出交付方式. 两个通知/post 事件都不可取消; 非 owner 路径不会为了审计而 off-thread 发布事件