WiIIiam278 / HuskSync

A modern, cross-server player data synchronisation system
https://william278.net/project/husksync
Apache License 2.0
169 stars 130 forks source link

refactor: Improve data validation, allow deletion of invalid snapshots #279

Closed WiIIiam278 closed 5 months ago

WiIIiam278 commented 5 months ago

Closes #182

This PR changes when data validation occurs, to take place on snapshot unpack rather than on deserialization.

Also adds in-game errors for when attempting to view unviewable snapshots (including with the reason why the snapshot is invalid). Invalid snapshots will also appear with a strikethrough on /userdata list

image

API change: DataException (which extends IllegalStateException can now be thrown on snapshot unpack() rather than the previous behavior which was to throw IllegalStateException during deserialization (though this is not anticipated to be a breaking change)