player = $player; $this->oldBook = $oldBook; $this->newBook = $newBook; $this->action = $action; $this->modifiedPages = $modifiedPages; } /** * Returns the action of the event. */ public function getAction() : int{ return $this->action; } /** * Returns the book before it was modified. */ public function getOldBook() : WritableBookBase{ return $this->oldBook; } /** * Returns the book after it was modified. * The new book may be a written book, if the book was signed. */ public function getNewBook() : WritableBookBase{ return $this->newBook; } /** * Sets the new book as the given instance. */ public function setNewBook(WritableBookBase $book) : void{ $this->newBook = $book; } /** * Returns an array containing the page IDs of modified pages. * * @return int[] */ public function getModifiedPages() : array{ return $this->modifiedPages; } }