thomasmny / BuildSystem

Powerful, easy to use system for builders
https://buildsystem.eintosti.de
Other
35 stars 16 forks source link

Alter how world data is stored #192

Closed thomasmny closed 1 year ago

thomasmny commented 1 year ago

Currently, lots of data world data (project, permission, icon, etc.) is saved in the BuildWorld object. As this PR also nows saves when a world was last loaded (when unload-worlds is activated), unloaded and edited, the class was starting to feel very clustered. Therefore, all world data is now saved in the WorldData class.

If you now want to retrieve the worlds permission the following has changed:

BuildWorld buildWorld = ...
String permission = buildWorld.getPermission();

has become

BuildWorld buildWorld = ...
String permission = buildWorld.getData().permission().get();

P.S.: The new saved data is saved in the placeholders: %buildsystem_lastedited%, %buildsystem_ lastloaded% and %buildsystem_ lastunloaded%