mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-19 09:54:10 +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)
|
* 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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user