mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 20:28:31 +00:00
Not sure how this got missed :<
This commit is contained in:
parent
e36b38939c
commit
4943ff9dfc
@ -125,14 +125,14 @@ class ExperienceOrb extends Entity{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getXpValue() : int{
|
public function getXpValue() : int{
|
||||||
return $this->getDataProperty(self::DATA_EXPERIENCE_VALUE) ?? 0;
|
return $this->propertyManager->getInt(self::DATA_EXPERIENCE_VALUE) ?? 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setXpValue(int $amount) : void{
|
public function setXpValue(int $amount) : void{
|
||||||
if($amount <= 0){
|
if($amount <= 0){
|
||||||
throw new \InvalidArgumentException("XP amount must be greater than 0, got $amount");
|
throw new \InvalidArgumentException("XP amount must be greater than 0, got $amount");
|
||||||
}
|
}
|
||||||
$this->setDataProperty(self::DATA_EXPERIENCE_VALUE, self::DATA_TYPE_INT, $amount);
|
$this->propertyManager->setInt(self::DATA_EXPERIENCE_VALUE, $amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function hasTargetPlayer() : bool{
|
public function hasTargetPlayer() : bool{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user