Skip to content

DwarfCraft Database Rework#98

Draft
drekryan wants to merge 18 commits intomasterfrom
database-rework
Draft

DwarfCraft Database Rework#98
drekryan wants to merge 18 commits intomasterfrom
database-rework

Conversation

@drekryan
Copy link
Collaborator

@drekryan drekryan commented Aug 16, 2023

This is an extensive rework and change set to help modernize DwarfCraft's data system. Please reference issue #96 for the full details and scope of the rework. Reworking skills and effects are not in the scope of this PR. The goal is to move fully to more modern and human readable data formats that server admins can not only more easily manage but can also be more easily developed as Minecraft updates and evolves.

  • Moves data loading to DwarfManager and moves the old data loading to a legacy package.
  • Players are now fully referenced by UUID and no longer a separately stored player ID
  • SQLite .db file is no longer included in the plugin and will no longer be copied or created
  • Player data is now stored in JSON format in dwarfcraft/data/players
  • Player data references skills by their string based skill id ie. "fire_starter"
  • Conversions from old versions of DwarfCraft that never converted trainer data or to UUIDs are no longer supported or converted. As of right now DwarfCraft, does not remove or change the old .db file so migrations that fail can be recovered. Please do not count on this behavior to stay the same and expect DwarfCraft to remove the .db file in the future. Please backup this file outside the plugin directory if this data is important to you.
  • Messages are now fully locale dependent and backup strings are no longer hardcoded in the plugin. DwarfCraft will automatically recreate the en_US locale file on server start if it is missing. If your file becomes damaged, delete it and it will be recreated. Support for other locales is coming soon.
  • Moved various data managers to the data package
  • Placeholder and output classes were moved to a util package
  • Level Up commands now listen to the LevelUpEvent listener and were moved to DwarfListener instead of being called from the DwarfCraft class.
  • Logging has been improved and cleaned up. The console logs should be easier to read. Info messages are logged automatically and cannot be disabled. Debug messages and more detailed info messages are hidden behind lower debug levels. The new default debug level is 10 and disables are debug messages. Lowering this below '6' will enable much more console spam but can be used to track down issues with data loading or DwarfCraft effects.
  • Various cleanups to imports

* Moves data loading to DwarfManager and moves the old data loading to a legacy package. We only support loading for SQLite in order to allow data conversions to the new format.
* Players are now fully referenced by UUID and no longer a separately stored player ID
* MySQL support is removed
* Removed config options for configuring MySQL and SQLite
* SQLite .db file is no longer included in the plugin and will no longer be copied or created
* Moved various data managers to the data package
* Placeholder and output classes were moved to a util package
* Level Up commands now listen to the LevelUpEvent listener and were moved to DwarfListener instead of being called from the DwarfCraft class.
* Various cleanups to imports and logging
@drekryan drekryan added the Issue-Feature New feature or request label Aug 16, 2023
@drekryan drekryan self-assigned this Aug 16, 2023
@drekryan drekryan linked an issue Aug 16, 2023 that may be closed by this pull request
3 tasks
@drekryan drekryan added this to the Minecraft 1.21 and future milestone Aug 16, 2023
Fixed an issue where specifying "all" for a skill id when using the set_skill command no longer worked
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Issue-Feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modernizing DwarfCraft

1 participant