ChiseledBookshelf: add setSlots()

This commit is contained in:
Dylan K. Taylor 2025-08-22 18:27:06 +01:00
parent 2bb78f2a94
commit e824266457
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -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.
*/