mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 09:19:42 +00:00
Durable: fixed leftover wtf from damage refactor
This commit is contained in:
parent
327c8361bd
commit
7dd3b5b996
@ -74,11 +74,11 @@ abstract class Durable extends Item{
|
|||||||
return $this->damage;
|
return $this->damage;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setDamage(int $meta) : Item{
|
public function setDamage(int $damage) : Item{
|
||||||
if($meta < 0 or $meta > $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 = $meta;
|
$this->damage = $damage;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user