For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /server-admin/classes/LevelStorage.md.

Class: LevelStorage experimental

data

Beta

控制服务器如何保存到磁盘。仅在专用服务器上可用。

Controls how the server saves to disk. Only available on dedicated server.

Methods

saveHold()

saveHold(): void

World Mutation Beta

Returns

void

Remarks

停止服务器写入世界文件,并开始创建快照。

Disables the server writing to the world files and begins creating a snapshot.

Throws

This function can throw errors.

LevelStorageSaveStateChangeError


saveQuery()

saveQuery(): LevelStorageQuerySnapshotFile[]

World Mutation Beta

Returns

LevelStorageQuerySnapshotFile[]

Remarks

返回当前快照(如果正在创建快照)中每个文件的路径和大小。

Returns the path and size of every file in the current snapshot if a snapshot is being taken.

Throws

This function can throw errors.

LevelStorageSaveStateChangeError


saveResume()

saveResume(): void

World Mutation Beta

Returns

void

Remarks

重新启用服务器将世界状态写入文件,并移除快照。

Re-enables server writing world state to files and removes snapshot.

Throws

This function can throw errors.

LevelStorageSaveStateChangeError

同领域相关