mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 00:07:30 +00:00
parent
71f2a34616
commit
69952ae2af
@ -475,8 +475,8 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
|
||||
* score when they die. (TODO: add this when MCPE supports it)
|
||||
*/
|
||||
public function setLifetimeTotalXp(int $amount) : void{
|
||||
if($amount < 0){
|
||||
throw new \InvalidArgumentException("XP must be greater than 0");
|
||||
if($amount < 0 || $amount > INT32_MAX){
|
||||
throw new \InvalidArgumentException("XP must be greater than 0 and less than " . INT32_MAX);
|
||||
}
|
||||
|
||||
$this->totalXp = $amount;
|
||||
|
Loading…
x
Reference in New Issue
Block a user