mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
avoid direct mutation of Item->count field, use Item->pop() instead
I think this change was already applied on the master branch, but I don't remember for sure.
This commit is contained in:
@ -44,7 +44,7 @@ class SpawnEgg extends Item{
|
||||
$entity = Entity::createEntity($this->meta, $player->getLevel(), $nbt);
|
||||
|
||||
if($entity instanceof Entity){
|
||||
--$this->count;
|
||||
$this->pop();
|
||||
$entity->spawnToAll();
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user