Config
checkStorageConfig
Section titled “checkStorageConfig”- Path:
world/carpetlmsaddition/checkStorageConfig.json - Purpose: Read by the storage data API and the built-in website feature. Includes port, auto-start flag, whether password is required, token expiry days, and the storage list filenames to process.
- Generated during world load if missing.
- Example:
{ "port": 7000, "autoStartWebsite": false, "customWebsite": false, "noPassword": false, "expireDay": 0, "storageList": ["example.json"]}noPassword: false:/api/storage/getDatarequiresAuthorization: Bearer <token>./api/storage/getItemrequiresAuthorization: Bearer <token>./api/storage/sendGetItemResultrequiresAuthorization: Bearer <token>.
noPassword: true:/api/storage/getDatacan be accessed without token./api/storage/getItemcan be accessed without token./api/storage/sendGetItemResultstill requiresAuthorization: Bearer <token>.
- If a token is provided:
/api/storage/getDataand/api/storage/getItemtry to validate it first.- When
noPassword: trueand token validation fails, these two APIs fall back to anonymous access. /api/storage/sendGetItemResultnever falls back to anonymous access.
customWebsite: false: use the built-in storage website.customWebsite: true: load files fromworld/carpetlmsaddition/customStorageWebsite/(the mod ensuresindex.htmlexists automatically).
checkStorageList
Section titled “checkStorageList”- Path:
world/carpetlmsaddition/checkStorageList/*.json - Purpose: Coordinate list read by the storage data API. Which files are read is controlled by
storageListincheckStorageConfig.json. - Example file:
world/carpetlmsaddition/checkStorageList/example.json - If
storageListcontainsexample.json, the mod generates this example file during world load when it is missing. - Example:
{ "overworld": [[0, 0, 0]], "end": [], "nether": []}