pocketmine\Player::getExpLevel PHP Method

getExpLevel() public method

Deprecation: Use Human::getXpLevel(), this method will be removed in the future.
public getExpLevel ( )
    public function getExpLevel()
    {
        trigger_error("This method is deprecated, do not use it", E_USER_DEPRECATED);
        return $this->getXpLevel();
    }

Usage Example

Example #1
0
 public function onRename(Item $item, Player $player) : bool
 {
     if ($player->getExpLevel() > $item->getRepairCost()) {
         $player->setExpLevel($player->getExpLevel() - $item->getRepairCost());
         return true;
     }
     return false;
 }
All Usage Examples Of pocketmine\Player::getExpLevel
Player