Durable: fixed leftover wtf from damage refactor

This commit is contained in:
Dylan K. Taylor 2018-10-26 18:17:34 +01:00
parent 327c8361bd
commit 7dd3b5b996

View File

@ -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;
} }