barusikozako_api-v1.3.0+forge1.20.1
Curse Maven Snippet
What's new
Added / 新增
- Added
BackupService.subscribeEventsfor backup commands, operations, and third-party API calls.
新增BackupService.subscribeEvents,用于观察杂鱼备份指令、操作和第三方 API 调用。 - Command events include the executor, optional player UUID and command input, with configuration values redacted. Operation events include the operation kind and, when available, the task ID and result. API call events include the integration ID and method name.
命令事件包含执行者、可选玩家 UUID 和命令内容,配置值会被隐藏。操作事件包含操作类型以及可用时的任务 ID 和结果。API 调用事件包含集成 ID 和方法名。 - Observation callbacks run asynchronously with a bounded queue. Listener registration, unregistration and API calls made directly inside callbacks do not produce API call events. When authorization is enabled, global observation is available to maintenance integrations.
观察事件回调异步执行,使用有界队列。监听器注册、退订及回调内直接发起的 API 调用不会产生 API 调用事件。启用授权时,维护集成可订阅全局观察事件。 - Added lifecycle callbacks for restoring a world from a recovery point.
新增从恢复点恢复世界的生命周期回调。 - The
OFFLINE_RECOVERYlifecycle context identifies the source world and recovery directory. A successful restore reportsRecoveryRestored.
OFFLINE_RECOVERY生命周期上下文提供来源存档和恢复点目录,恢复成功后报告RecoveryRestored结果。 GameContextexposes a read-only server view to integrations:getOnlinePlayerCount(),isDedicatedServer(),isWorldLoaded(),sendMessageToAdmins(String),sendMessageToPlayers(String)andsubscribeServerEvents(ServerEventListener). Every method may be called from any thread, message delivery is forwarded to the game thread, and queries throwIllegalStateExceptiononce the server is stopping or the world is no longer loaded instead of returning stale or zero values.
GameContext向集成提供只读的服务器视图:getOnlinePlayerCount()、isDedicatedServer()、isWorldLoaded()、sendMessageToAdmins(String)、sendMessageToPlayers(String)与subscribeServerEvents(ServerEventListener)。所有方法都可以在任意线程调用,消息投递会转发到游戏线程;服务器正在关闭或世界已卸载时查询抛出IllegalStateException,不会返回过期值或零。BackupIntegration.onGameContext(GameContext)delivers that view afteronBackupService. It is a default method, so integrations compiled against 1.2.0 keep loading and running unchanged.
BackupIntegration.onGameContext(GameContext)在onBackupService之后交付该视图。它是默认方法,因此基于 1.2.0 编译的集成可以原样加载与运行。ServerEventListenerreceivesonServerStarted,onServerEmptyandonServerOccupiedon the integration thread. Edges are only reported when the player count crosses zero, the initial state is silent, nothing is replayed for listeners registered later, and the returned handle unsubscribes idempotently.
ServerEventListener在集成线程上接收onServerStarted、onServerEmpty与onServerOccupied。只有人数跨越零时才报告边沿,初始状态静默,晚注册的监听器不会收到历史事件,返回的句柄可幂等解除订阅。
This Changelog is AIGC and verified
本次更新日志为AI生成内容,并且经过验证
Full changelog / 完整更新日志:
All Relations
- All Relations
- Embedded Library
- Optional Dependency
- Required Dependency
- Tool
- Incompatible
- Include

