Leveling API
The EdToolsLevelingAPI provides control over the plugin's leveling system. You can manage player levels, check rewards, and get configuration data.
Get API Instance
EdToolsLevelingAPI levelingAPI = EdToolsAPI.getInstance().getLevelingAPI();Methods
getLevel(UUID uuid, String levelId)
getLevel(UUID uuid, String levelId)Retrieves the current level of a player for a specific leveling category.
uuid: The player's unique ID.levelId: The ID of the leveling category (e.g., "crop-level").Returns: A
doublewith the player's current level.
setLevel(UUID uuid, String levelId, double level)
setLevel(UUID uuid, String levelId, double level)Sets a player's level to a specific value.
uuid: The player's unique ID.levelId: The leveling category ID.level: The new level.
addLevel(UUID uuid, String levelId, double level)
addLevel(UUID uuid, String levelId, double level)Adds a specified amount of levels to a player's total.
uuid: The player's unique ID.levelId: The leveling category ID.level: The amount to add.
removeLevel(UUID uuid, String levelId, double level)
removeLevel(UUID uuid, String levelId, double level)Removes a specified amount of levels from a player.
uuid: The player's unique ID.levelId: The leveling category ID.level: The amount to remove.
isLevel(String level)
isLevel(String level)Checks if a leveling category exists.
level: The leveling category ID.Returns:
trueif it exists,falseotherwise.
getStartingLevel(String level)
getStartingLevel(String level)Gets the configured starting level for a category.
level: The leveling category ID.Returns: A
doublewith the starting level.
isAutomaticLeveling(String level)
isAutomaticLeveling(String level)Checks if a category is configured for automatic leveling.
level: The leveling category ID.Returns:
trueif leveling is automatic,falseotherwise.
getLevelName(String level)
getLevelName(String level)Gets the display name of a leveling category.
level: The leveling category ID.Returns: A
Stringwith the display name.
Reward Information
getForEachRewards(String level): Returns a list of commands executed for each level up.getIntervalRewards(String level): Returns a map of rewards for level intervals (e.g., every 10 levels).getSpecificRewards(String level): Returns a map of rewards for reaching specific levels.
Was this helpful?