-
-
Notifications
You must be signed in to change notification settings - Fork 4
Getting Data
Retrieving data from PUUIDs is extremely easy and familiar! Why? Because it's nearly identical to the functions that you use with getConfig().
To access data, you do not have to use the PUUIDS.connect() handshake mentioned in the "Setting Player Data" page, HOWEVER it is highly recommended that you do so anyways.
Above is the list of methods you can use to get user data. One noticeable difference from getConfig() functions is an additional Plugin parameter. Before any function can be used in PUUIDs you must pass your plugins object in the first variable. You may notice some additional functions that serve to make your life a bit easier.
final String uuid = p.getUniqueId().toString();
// Save my catchphrase
PUUIDS.set(this, uuid, "Catchphrase", "Kaa-chow!");
// Get saved catchphrase
PUUIDS.getString(this, uuid, "Catchphrase"); // returns "Kaa-chow!"These are additional functions that scan all of the player files and return a list of those who meet the given criteria. Unlike the normal get functions, these require this initial onEnable handshake.
getAllPlayernames - Returns a list of every player's username who has a PUUIDs data file currently.
getAllUUIDs - Returns a list of every UUID that has a file (optional boolean is quick mode. returns file name instead rather than combing through the contents)
getAllWithBoolean - Returns a list of every UUID that has a "true" boolean for a specific location value.
getAllWithoutBoolean - Returns a list of every UUID that has a "false" boolean for a specific location value.
This Wiki is still under construction. I am working my best to accurately document the API and ensure up to date information for PUUIDs.