Not sure how this got missed :<

This commit is contained in:
Dylan K. Taylor 2018-01-21 19:36:42 +00:00
parent e36b38939c
commit 4943ff9dfc

View File

@ -125,14 +125,14 @@ class ExperienceOrb extends Entity{
}
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{
if($amount <= 0){
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{