Skip to content

Conversation

@x3rt
Copy link
Contributor

@x3rt x3rt commented Apr 19, 2025

Breaking Changes

  • CustomDataStore<T>.Get no longer automatically creates an instances if it does not exist, and instead returns null. The previous naming was misleading

Changes

  • Stop using reflection for Adding/Removing Players to Data Stores and Destroying instances
  • Stop registering un-registered Data Stores in GetOrAdd as it can lead to undesired behavior
  • Added CustomDataStore.GetAll<T>() to get all instances of a specific store. Idea from @SlejmUr
  • Added CustomDataStore.Exists<T>(Player) to check whether a player has the specified DataStore. Implemented by @xCynDev
  • Added CustomDataStore.Get<T>(Player) which only returns an existing instance or null if one does not exist.
  • Added CustomDataStore.TryGet<T>(Player, out T?)
  • Made CustomDataStore.Destroy<T>(Player) public as it is now possible to use datastores without ever registering them, meaning developers can manage the lifetimes themselves

@x3rt x3rt self-assigned this Apr 19, 2025
@x3rt x3rt changed the title Data Store Performance Improvement Data Store Performance Improvements Apr 30, 2025
@x3rt x3rt changed the title Data Store Performance Improvements Data Store Improvements May 2, 2025
@x3rt x3rt marked this pull request as draft May 25, 2025 19:52
@x3rt
Copy link
Contributor Author

x3rt commented May 25, 2025

Going to add a few things later today/tomorrow.

@x3rt x3rt marked this pull request as ready for review May 29, 2025 20:44
@LumiFae
Copy link
Member

LumiFae commented Sep 2, 2025

@Jesus-QC @x3rt any chance we can get an update on this one? would be really useful to have in the next update, or later.

@Jesus-QC
Copy link
Member

Jesus-QC commented Sep 2, 2025

@Jesus-QC @x3rt any chance we can get an update on this one? would be really useful to have in the next update, or later.

Yes of course, as this contains breaking changes it is being paused until our next breaking update

Base automatically changed from dev to master October 24, 2025 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants