PUUIDs • An Async File API icon

PUUIDs • An Async File API -----

A fast, reliable, and open source offline UUID and storage management API.



[​IMG]
Easy to use API for storing information offline for individual players.
What is PUUIDs?
PUUIDs is an efficient, fast, and lightweight API for storing, getting, and reading information for players based off their UUID. This comes in handy for developers who are looking to store information per-player without having to develop and maintain a completely async file system for each individual player. Having multiple plugins create files for each player can be extremely resource intensive for developers and for your server's health.

How to use PUUIDs?
For Server Owners:
If you run a server and you're here, you most likely have stumbled upon a plugin that uses/requires PUUIDs to fully function. To use, simply download the PUUIDs.jar, place it in your server's plugin folder, and restart your server.
For Developers:
If you're a developer, and you have player files that store/read information, then migrating to PUUIDs is a must. With PUUIDs, you can store, read, and set data for players without needing to write tons obsolete code completely async all while saving the hassle of managing hundreds of player files.

Ugh, another dependency?
As a server owner, using tons of plugins is stressful. You never know which ones are using the most resources, causing lag, or posing potentially harmful risks to your server's performance. When a developer uses PUUIDs in their plugin, they understand server performance is a top priority. PUUIDs is extremely lightweight, 100% open source, and written for performance.

Why PUUIDs?
  • All operations are thread safe.
  • All saving tasks are done asynchronously off of the main thread, to prevent a heavy server performance impact.
  • Self-monitoring to ensure smooth performance.
  • Actively maintained and updated for the latest Minecraft versions.
  • Self cleans player files by default by removing old data after a configurable amount of time to keep the system fresh & fast.
  • Stores the messy stuff for you! (UUIDs, IPs, Timestamps, Ontime)
  • Stability you can count on! PUUIDs wont break with new Minecraft updates.
For Developers
Getting Started
PUUIDs uses a basic handshake with your plugin before letting any modifications be made to files. This helps to write/get files for your plugin, and prevent accidentally overwriting other data.
Code (Java):
public void onEnable ( ) {
    PUUIDS. connect ( this, APIVersion. V4 ) ;
    // Use API version to ensure your plugin is written for the latest PUUIDs version.
    // If APIVersion was V3 for example, PUUIDs would try and ensure maximum compatibility between versions.
    // This method returns a boolean (true if connection was successful and false if it failed)
}
Add Soft-Depend
To make sure PUUIDs loads before your plugin does, you'll need to add this to your plugin.yml:
Code (YAML):
softdepend : [PUUIDs ]
Note the capitalization of PUUIDs, with ALL CAPS and the s remaining lowercase.

Add Maven Dependancy
Code (XML):
<repository>
    <id>jitpack.io </id>
    <url>https://jitpack.io </url>
</repository>
<dependency>
    <groupId>com.github.zachduda </groupId>
    <artifactId>PUUIDs </artifactId>
    <version>3.2.2 </version>
    <scope>provided </scope>
</dependency>

Write Your Plugin Data for a Player
Similar to the usage of modifications to a config.yml, PUUIDs has many methods (and some additional ones) to help make adding data for players easy and smooth. Typically, PUUIDS.set() will take care of most values. (Supports Async)
Code (Java):
final String uuid = p. getUniqueId ( ). toString ( ) ;
PUUIDS. set ( this, uuid, "MyValue", true ) ;
PUUIDS. set ( this, uuid, "My2ndValue", 0.5 ) ;
PUUIDS. set ( this, uuid, "My3rdValue", "I love PUUIDS!" ) ;
Get Data for a Player
Also similar to a config.yml, there are getString(), getList() etc. methods for what you set. (More on that coming soon!)​

See all methods and examples with the Wiki on GitHub
Support
Need a hand in setting up your plugin with PUUID? Have a question, concern, or suggestion? Join our support discord.

[​IMG]
Resource Information
Author:
----------
Total Downloads: 1,244
First Release: Sep 22, 2019
Last Update: Apr 23, 2023
Category: ---------------
All-Time Rating:
2 ratings
Find more info at github.com...
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings