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