-
-
Notifications
You must be signed in to change notification settings - Fork 4
Home
PUUIDs is the fastest, easiest per-player file system 'around! The best part about it? No boilerplate, no clean-up, and 100% thread safe read/writing without the hassle.
Lots of developers waste their time making a file system for each of their plugins. Maintaining this code within your own projects is time consuming, and requires lots of valuable resources for each write cycle made to a database.
| Features | Synchronous | Asynchronous | PUUIDs |
|---|---|---|---|
| Low Latency Read/Writes | ✅ | ❌ | ✅ |
| Overwrite Safe | ✅ | ❌ | ✅ |
| Preserves Order | ✅ | ❌ | ✅ |
| Assigns Task IDs | ✅ | ❌ | ✅ |
| Multithread Saving (Better TPS) | ❌ | ✅ | ✅ |
| Intuitive API | ❌ | ❌ | ✅ |
| Per-Player Defaults | ❌ | ❌ | ✅ |
| Smart Queuing System | ❌ | ❌ | ✅ |
Looking for more documentation? Try looking at the Java-Docs for a better run through: PUUIDs.java
PUUIDs works by taking all requests to save a file and organizing it into a neat queue. This queue runs on an asynchronous timer that is kept off the main game thread to avoid lagging the server. Each time the timer passes around (usually once every second), a handful of saves will be written to the file. Each plugin has their data stored separately, and each file is saved per user.
The basics are connecting, getting, and setting.
First you must connect your plugin to the API right on startup with PUUIDs.connect(this, PUUIDs.APIVersion.V4)
After this, you can now start using the API in your plugin!
The PUUIDs.get function tries to mimic that of the getConfig() function. The usage is pretty much the same, but instead of just a path there are a few extra parameters: PUUIDs.getString(this, PLAYERS_UUID_AS_STRING, path)
The PUUIDs.set function is nearly identical to that of the getConfig() function but with the extra parameters mentioned above: PUUIDs.set(this, PLAYERS_UUID_AS_STRING, path, value)
This wiki is still under construction and is still lacking lots of documentation. Feel free to make any contributions to the wiki to help me document it better!
This Wiki is still under construction. I am working my best to accurately document the API and ensure up to date information for PUUIDs.