PSA: Custom Data Serialization Changes

Hello Sponge community!

It’s not often that we have to do this, however, the most recent changes for both the API and Implementation affect every single developer and server owner using plugins that create and utilize custom data.

What does this mean for you?

###If you’re a developer:
Update your plugin for the latest API 6 snapshots to take advantage of the new DataRegistration uses, and register any previously used class names for custom data with the DataManager. If you’ve done so, there won’t be any issue attempting to upgrade any existing custom data from any source.

###If you’re a server owner:
###BACKUP YOUR WORLDS AND PLAYER DATA FILES
NO, SERIOUSLY, THERE IS NO TURNING BACK ONCE YOU’VE UPGRADED AND PLUGINS HAVE MADE THE CHANGE.
I can’t stress this enough, this change will render any custom data already re-serialized to being rendered useless if you downgrade versions to a previous version.

If you have any more questions, please do comment as I will answer them when time permits.

13 Likes

Did the changes bring improvements to the way custom data is handled if the issuing plugin is removed?

Is this supposed to be a banner? If so, doesn’t show up for me.

Yes, this has a fallback to retain data if a plugin is removed.

1 Like

Does it still display a warning for every class it finds on every object if the plugin is uninstalled?

Only once, usually will be found on world load or first player load with that custom data.

Will using this form of Data Serialization solve my de-serializing issue that I had posted here a while ago?

I’m not sure, it’s potentially a separate issue, which is why it hasn’t been closed yet.

2 Likes