diff --git a/src/block/ChiseledBookshelf.php b/src/block/ChiseledBookshelf.php index be49c7a91..cbe22a94b 100644 --- a/src/block/ChiseledBookshelf.php +++ b/src/block/ChiseledBookshelf.php @@ -114,6 +114,18 @@ class ChiseledBookshelf extends Opaque implements HorizontalFacing{ return $this->slots; } + /** + * @param ChiseledBookshelfSlot[] $slots + * @return $this + */ + public function setSlots(array $slots) : self{ + $this->slots = []; + foreach($slots as $slot){ + $this->setSlot($slot, true); + } + return $this; + } + /** * Returns the last slot interacted by a player or null if no slot has been interacted with yet. */