public function onClose(Player $who)
{
parent::onClose($who);
$level = $this->getHolder()->getLevel();
for ($i = 0; $i < 2; ++$i) {
if ($level instanceof Level) {
$level->dropItem($this->getHolder()->add(0.5, 0.5, 0.5), $this->getItem($i));
}
$this->clear($i);
}
if (count($this->getViewers()) === 0) {
$this->levels = null;
$this->entries = null;
$this->bookshelfAmount = 0;
}
}