mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Merge branch 'legacy/pm3' into stable
This commit is contained in:
@ -82,6 +82,9 @@ class PlayerExperienceChangeEvent extends EntityEvent implements Cancellable{
|
||||
}
|
||||
|
||||
public function setNewProgress(?float $newProgress) : void{
|
||||
if($newProgress < 0.0 || $newProgress > 1.0){
|
||||
throw new \InvalidArgumentException("XP progress must be in range 0-1");
|
||||
}
|
||||
$this->newProgress = $newProgress;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user