mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-12 16:59:44 +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;
|
||||
}
|
||||
|
||||
public function setDamage(int $meta) : Item{
|
||||
if($meta < 0 or $meta > $this->getMaxDurability()){
|
||||
public function setDamage(int $damage) : Item{
|
||||
if($damage < 0 or $damage > $this->getMaxDurability()){
|
||||
throw new \InvalidArgumentException("Damage must be in range 0 - " , $this->getMaxDurability());
|
||||
}
|
||||
$this->damage = $meta;
|
||||
$this->damage = $damage;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user