Definition at line 31 of file PlayerEditBookEvent.php.
◆ __construct()
pocketmine\event\player\PlayerEditBookEvent::__construct |
( |
Player | $player, |
|
|
private WritableBookBase | $oldBook, |
|
|
private WritableBookBase | $newBook, |
|
|
private int | $action, |
|
|
private array | $modifiedPages ) |
◆ call()
pocketmine\event\Event::call |
( |
| ) |
|
|
inherited |
Calls event handlers registered for this event.
- Exceptions
-
RuntimeException if event call recursion reaches the max depth limit
Definition at line 49 of file Event.php.
◆ getAction()
pocketmine\event\player\PlayerEditBookEvent::getAction |
( |
| ) |
|
◆ getEventName()
pocketmine\event\Event::getEventName |
( |
| ) |
|
|
finalinherited |
◆ getModifiedPages()
pocketmine\event\player\PlayerEditBookEvent::getModifiedPages |
( |
| ) |
|
Returns an array containing the page IDs of modified pages.
- Returns
- int[]
Definition at line 87 of file PlayerEditBookEvent.php.
◆ getNewBook()
pocketmine\event\player\PlayerEditBookEvent::getNewBook |
( |
| ) |
|
Returns the book after it was modified. The new book may be a written book, if the book was signed.
Definition at line 71 of file PlayerEditBookEvent.php.
◆ getOldBook()
pocketmine\event\player\PlayerEditBookEvent::getOldBook |
( |
| ) |
|
◆ getPlayer()
pocketmine\event\player\PlayerEvent::getPlayer |
( |
| ) |
|
|
inherited |
◆ hasHandlers()
static pocketmine\event\Event::hasHandlers |
( |
| ) |
|
|
staticinherited |
Returns whether the current class context has any registered global handlers. This can be used in hot code paths to avoid unnecessary event object creation.
Usage: SomeEventClass::hasHandlers()
Definition at line 77 of file Event.php.
◆ isCancelled()
pocketmine\event\Cancellable::isCancelled |
( |
| ) |
|
|
inherited |
Returns whether this instance of the event is currently cancelled.
If it is cancelled, only downstream handlers that declare @handleCancelled
will be called with this event.
◆ setNewBook()
pocketmine\event\player\PlayerEditBookEvent::setNewBook |
( |
WritableBookBase | $book | ) |
|
◆ $eventName
string pocketmine\event\Event::$eventName = null |
|
protectedinherited |
◆ $player
Player pocketmine\event\player\PlayerEvent::$player |
|
protectedinherited |
◆ ACTION_ADD_PAGE
const pocketmine\event\player\PlayerEditBookEvent::ACTION_ADD_PAGE = 1 |
◆ ACTION_DELETE_PAGE
const pocketmine\event\player\PlayerEditBookEvent::ACTION_DELETE_PAGE = 2 |
◆ ACTION_REPLACE_PAGE
const pocketmine\event\player\PlayerEditBookEvent::ACTION_REPLACE_PAGE = 0 |
◆ ACTION_SIGN_BOOK
const pocketmine\event\player\PlayerEditBookEvent::ACTION_SIGN_BOOK = 4 |
◆ ACTION_SWAP_PAGES
const pocketmine\event\player\PlayerEditBookEvent::ACTION_SWAP_PAGES = 3 |
The documentation for this class was generated from the following file: