Cannot modify .ini file
#3
Please do not to use .ini files for data storage:
- they are slow, and they get slower when more data is written to them
- they are not safe. If the server crashes while operating on the file, the file will be corrupt and data recovery is nearly impossible

Use the SQLite database instead. It's fast, it's safe and it is exactly meant for this kind of data. If you need an example of how to work with SQLite databases from a Cuberite plugin, have a look at some of these:
- Gallery plugin: https://github.com/cuberite/gallery (the entire gallery information is stored in a DB, see Storage_SQLite.lua for the access layer)
- Core plugin: https://github.com/mc-server/Core (the banlist and whitelist are using SQLite DBs)
- Aliases plugin: https://github.com/madmaxoft/Aliases (the aliases are stored in a SQLite DB)
- LastSeen plugin: https://github.com/madmaxoft/LastSeen (the last seen timestamp and player preferences are stored in a SQLite DB)
Reply
Thanks given by:


Messages In This Thread
Cannot modify .ini file - by KaRoLak - 08-26-2015, 10:45 PM
RE: Cannot modify .ini file - by NiLSPACE - 08-26-2015, 10:54 PM
RE: Cannot modify .ini file - by xoft - 08-27-2015, 01:29 AM



Users browsing this thread: 2 Guest(s)