Home / Config & data

save()

save()

Writes plugin data and loaded player data using temporary files and rename.

Parameters

None.

Returns

Nothing.

Example

data.count = (data.count or 0) + 1

on("disable", function()
  save()
end)

Notes

The server also saves plugin data during full saves, periodic saves, plugin unload/reload, and shutdown. Call save() after important changes that should be persisted promptly.