[API] PremiumLevels » Powerful leveling API! [1.16 - 1.21] icon

[API] PremiumLevels » Powerful leveling API! [1.16 - 1.21] -----

Add custom player levels on your server!



How to use PremiumLevels API
The plugin simply allows any other plugin to easily call it using a simple API. To use the API, add the jar of the plugin and the following line in your plugin :
Code (Text):
PremiumLevels premiumLevels = (PremiumLevels) Bukkit.getServer().getPluginManager().getPlugin("PremiumLevels");
What the API can do
Using the API, you can now do the following :
  • Add experience to a player :
    Code (Text):
    premiumLevels.getPlayerLevel(player).addExperience(double);
  • Set the experience of a player :
    Code (Text):
    premiumLevels.getPlayerLevel(player).setExperience(double);
  • Add levels to a player :
    Code (Text):
    premiumLevels.getPlayerLevel(player).addLevel(int);
  • Set the level of a player :
    Code (Text):
    premiumLevels.getPlayerLevel(player).setLevel(int);
  • Get the experience of a player :
    Code (Text):
    double experience = premiumLevels.getPlayerLevel(player).getExperience();
  • Get the level of a player :
    Code (Text):
    int level = premiumLevels.getPlayerLevel(player).getLevel();
Resource Information
Author:
----------
Total Downloads: 29
First Release: Apr 18, 2024
Last Update: Apr 18, 2024
Category: ---------------
All-Time Rating:
0 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings