mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Added API method Item->pop()
This commit is contained in:
@ -1823,10 +1823,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
$this->broadcastLevelSoundEvent($hand, LevelSoundEventPacket::SOUND_PLACE, 1, $hand->getId());
|
||||
}
|
||||
|
||||
$item->setCount($item->getCount() - 1);
|
||||
if($item->getCount() <= 0){
|
||||
$item = ItemFactory::get(Item::AIR, 0, 0);
|
||||
}
|
||||
$item->pop();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user