Inheritance: extends EntityEvent, implements pocketmine\event\Cancellable
 public function setResidue($residue)
 {
     if (!$residue instanceof Block) {
         throw new \InvalidArgumentException("Eating a Block can only result in a Block residue");
     }
     parent::setResidue($residue);
 }
Beispiel #2
0
 public function setResidue($residue)
 {
     if (!$residue instanceof Item) {
         throw new \InvalidArgumentException("Eating an Item can only result in an Item residue");
     }
     parent::setResidue($residue);
 }