Ultimate player data management
Follow the instructions below.
None
Clone the repository
$ git clone https://github.com/TheosWare/Profiler
Compile the project using an IDE
Put the .jar into your plugins folder
Server owners
After putting the .jar into your plugins folder, download and install any plugin that utilizes Profiler
Developers
Compile the project into a .jar
Add the new .jar to the build path of your plugins project
Start making use of the API (Read below for more information)
-
Get the profiler plugin instance
Profiler profiler = (Profiler) this.getServer().getPluginManager().getPlugin("Profiler");⋅⋅⋅
-
Get the players Client instance
Client client = profiler.getClientManager().getClient(Player);
-
Get the profile
Profile profile = client.getProfile("Stats");
-
Check if the profile exists
if(profile == null)- Create the profile
profile = client.addProfile("Stats");
- Set the default values
profile.setValue("Kills", 0);
- Save the client
client.save();
- Create the profile
-
Get/Set data
- Get data
profile.getValue("Kills");
- Set data
profile.setValue("Kills", 0);
- Get data
-
Save the client
client.save();
-
Set plugin.yml depend
depend: [Profiler]
- Theos - Initial work - TheosWare