Documentation

PlayerEditBookEvent extends PlayerEvent
in package
implements Cancellable Uses CancellableTrait

Interfaces, Classes, Traits and Enums

Cancellable
This interface is implemented by an Event subclass if and only if it can be cancelled.

Table of Contents

ACTION_ADD_PAGE  = 1
ACTION_DELETE_PAGE  = 2
ACTION_REPLACE_PAGE  = 0
ACTION_SIGN_BOOK  = 4
ACTION_SWAP_PAGES  = 3
MAX_EVENT_CALL_DEPTH  = 50
$eventName  : string|null
$player  : Player
$action  : int
$eventCallDepth  : int
$isCancelled  : bool
$modifiedPages  : array<string|int, int>
$newBook  : WritableBookBase
$oldBook  : WritableBookBase
__construct()  : mixed
call()  : void
Calls event handlers registered for this event.
cancel()  : void
getAction()  : int
Returns the action of the event.
getEventName()  : string
getModifiedPages()  : array<string|int, int>
Returns an array containing the page IDs of modified pages.
getNewBook()  : WritableBookBase
Returns the book after it was modified.
getOldBook()  : WritableBookBase
Returns the book before it was modified.
getPlayer()  : Player
isCancelled()  : bool
setNewBook()  : void
Sets the new book as the given instance.
uncancel()  : void

Constants

MAX_EVENT_CALL_DEPTH

private mixed MAX_EVENT_CALL_DEPTH = 50

Properties

$eventName

protected string|null $eventName = null

$eventCallDepth

private static int $eventCallDepth = 1

Methods

call()

Calls event handlers registered for this event.

public call() : void
Tags
throws
RuntimeException

if event call recursion reaches the max depth limit

Return values
void

getAction()

Returns the action of the event.

public getAction() : int
Return values
int

getEventName()

public final getEventName() : string
Return values
string

getModifiedPages()

Returns an array containing the page IDs of modified pages.

public getModifiedPages() : array<string|int, int>
Return values
array<string|int, int>

Search results