-
Notifications
You must be signed in to change notification settings - Fork 6
DataStructure
This section covers the internal data structure used inside the corresponding .dat files. It is not recommended to edit the files directly, but it can be useful for debugging and testing.
The data are stored in the data
folder of your world folder like saves/[World Name]/data/...
or [world]/data/...
.
The reward data are separated by year month and will be calculated at the beginning of the month based on the provided config.
Data structure:
- AdditionalRewards
- YearMonth: Year-Month (key)
- RewardItems: Rewards 1-31 [ItemStack ...]
- Rewards
- YearMonth: Year-Month (key)
- RewardItems: Rewards 1-31 [ItemStack ...]
The reward user data tracking the given rewards to the user, they have no direct relationship to the reward data to make sure updates will not make former rewards invalid and are only relevant for further items.
Data structure:
- UserRewards
- YearMonthUser: Year-Month-UUID (key)
- RewardItems: Rewards 1-31 (takeable) [ItemStack ...]
- LastRewardedDay: Year-Month-Day (String)
- RewardedDays: Number of rewarded days (int)
If you want to adjust the reward data for a specific day or user you should try to use the provided commands instead of editing the data files directly.
In the case you need to edit the data files directly, make sure that the items of the RewardData and RewardUserData are matching otherwise there could be some issues with the reward screen.
You should also only edit the data files if the server is not running, otherwise the changes will be overwritten by the server.