PocketMine-MP 5.21.2 git-a6534ecbbbcf369264567d27e5ed70f7f5be9816
Loading...
Searching...
No Matches
pocketmine\entity\utils\ExperienceUtils Class Reference
+ Collaboration diagram for pocketmine\entity\utils\ExperienceUtils:

Static Public Member Functions

static getLevelFromXp (int $xp)
 
static getXpToCompleteLevel (int $level)
 
static getXpToReachLevel (int $level)
 

Detailed Description

Definition at line 31 of file ExperienceUtils.php.

Member Function Documentation

◆ getLevelFromXp()

static pocketmine\entity\utils\ExperienceUtils::getLevelFromXp ( int $xp)
static

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.

Definition at line 63 of file ExperienceUtils.php.

◆ getXpToCompleteLevel()

static pocketmine\entity\utils\ExperienceUtils::getXpToCompleteLevel ( int $level)
static

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

Definition at line 49 of file ExperienceUtils.php.

◆ getXpToReachLevel()

static pocketmine\entity\utils\ExperienceUtils::getXpToReachLevel ( int $level)
static

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

Definition at line 36 of file ExperienceUtils.php.


The documentation for this class was generated from the following file: