mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-03 08:39:53 +00:00
Fixed wtf in Durable->setDamage() exception throw
This commit is contained in:
parent
f4105fd91a
commit
e1795dfd49
@ -76,7 +76,7 @@ abstract class Durable extends Item{
|
|||||||
|
|
||||||
public function setDamage(int $damage) : Item{
|
public function setDamage(int $damage) : Item{
|
||||||
if($damage < 0 or $damage > $this->getMaxDurability()){
|
if($damage < 0 or $damage > $this->getMaxDurability()){
|
||||||
throw new \InvalidArgumentException("Damage must be in range 0 - " , $this->getMaxDurability());
|
throw new \InvalidArgumentException("Damage must be in range 0 - " . $this->getMaxDurability());
|
||||||
}
|
}
|
||||||
$this->damage = $damage;
|
$this->damage = $damage;
|
||||||
return $this;
|
return $this;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user