mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-16 02:38:54 +00:00
Fixed EntityEatItemEvent::setResidue() declaration
This commit is contained in:
parent
86ec7ed771
commit
d59fd42fc6
@ -23,7 +23,6 @@ namespace pocketmine\event\entity;
|
||||
|
||||
use pocketmine\entity\Entity;
|
||||
use pocketmine\item\Food;
|
||||
use pocketmine\item\FoodSource;
|
||||
use pocketmine\item\Item;
|
||||
|
||||
class EntityEatItemEvent extends EntityEatEvent{
|
||||
@ -38,7 +37,7 @@ class EntityEatItemEvent extends EntityEatEvent{
|
||||
return parent::getResidue();
|
||||
}
|
||||
|
||||
public function setResidue(FoodSource $residue){
|
||||
public function setResidue($residue){
|
||||
if(!($residue instanceof Item)){
|
||||
throw new \InvalidArgumentException("Eating an Item can only result in an Item residue");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user