Set motion to an item entity PHP: /** @var Level $level *//** @var Vector3 $pos */$item = Item::get(Item::QUARTZ_BLOCK);$motion = new Vector3(0, 1.5, 0);//will travel 1.5 blocks on the Y axis$level->dropItem($pos, $item, $motion);
Fake it using packets? If you know the block position, send the following packet to the player: PHP: /** @var Vector3 $block */$pk = new BlockEventPacket();$pk->x = $block->x;$pk->y = $block->y;$pk->z = $block->z;$pk->eventType = 1;$pk->eventData = 1;//1=open, 0=close
I Think you should use removeWindow https://github.com/pmmp/PocketMine-MP/blob/master/src/pocketmine/Player.php At Line 3880