PlayerEditBookEvent
Extends PlayerEvent
Implements Cancellable
Constants
ACTION_ADD_PAGE
php
public const ACTION_ADD_PAGE = 1ACTION_DELETE_PAGE
php
public const ACTION_DELETE_PAGE = 2ACTION_REPLACE_PAGE
php
public const ACTION_REPLACE_PAGE = 0ACTION_SIGN_BOOK
php
public const ACTION_SIGN_BOOK = 4ACTION_SWAP_PAGES
php
public const ACTION_SWAP_PAGES = 3Methods
__construct()
php
public function __construct(\pocketmine\player\Player $player, \pocketmine\item\WritableBookBase $oldBook, \pocketmine\item\WritableBookBase $newBook, int $action, array $modifiedPages)getAction()
php
public function getAction() : intReturns the action of the event.
getModifiedPages()
php
public function getModifiedPages() : arrayReturns an array containing the page IDs of modified pages.
getNewBook()
php
public function getNewBook() : \pocketmine\item\WritableBookBaseReturns the book after it was modified. The new book may be a written book, if the book was signed.
getOldBook()
php
public function getOldBook() : \pocketmine\item\WritableBookBaseReturns the book before it was modified.
setNewBook()
php
public function setNewBook(\pocketmine\item\WritableBookBase $book) : voidSets the new book as the given instance.
