Skip to content

WrittenBook ​

class · pocketmine\item\WrittenBook · source

Extends WritableBookBase

Constants ​

GENERATION_COPY ​

php
public const GENERATION_COPY = 1

GENERATION_COPY_OF_COPY ​

php
public const GENERATION_COPY_OF_COPY = 2

GENERATION_ORIGINAL ​

php
public const GENERATION_ORIGINAL = 0

GENERATION_TATTERED ​

php
public const GENERATION_TATTERED = 3

TAG_AUTHOR ​

php
public const TAG_AUTHOR = "author"

TAG_GENERATION ​

php
public const TAG_GENERATION = "generation"

TAG_TITLE ​

php
public const TAG_TITLE = "title"

Methods ​

deserializeCompoundTag() protected ​

php
protected function deserializeCompoundTag(\pocketmine\nbt\tag\CompoundTag $tag) : void

getAuthor() ​

php
public function getAuthor() : string

Returns the author of this book. This is not a reliable way to get the name of the player who signed this book. The author can be set to anything when signing a book.

getGeneration() ​

php
public function getGeneration() : int

Returns the generation of the book. Generations higher than 1 can not be copied.

getMaxStackSize() ​

php
public function getMaxStackSize() : int

getTitle() ​

php
public function getTitle() : string

Returns the title of this book.

serializeCompoundTag() protected ​

php
protected function serializeCompoundTag(\pocketmine\nbt\tag\CompoundTag $tag) : void

setAuthor() ​

php
public function setAuthor(string $authorName) : self

Sets the author of this book.

setGeneration() ​

php
public function setGeneration(int $generation) : self

Sets the generation of a book.

setTitle() ​

php
public function setTitle(string $title) : self

Sets the author of this book.

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.