Skip to content

ExperienceUtils ​

abstract class · pocketmine\entity\utils\ExperienceUtils · source

Methods ​

getLevelFromXp() ​

php
public static function getLevelFromXp(int $xp) : float

Calculates and returns the number of XP levels the specified amount of XP points are worth. This returns a floating-point number, the decimal part being the progress through the resulting level.

getXpToCompleteLevel() ​

php
public static function getXpToCompleteLevel(int $level) : int

Returns the amount of XP needed to reach $level + 1.

getXpToReachLevel() ​

php
public static function getXpToReachLevel(int $level) : int

Calculates and returns the amount of XP needed to get from level 0 to level $level

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.