Package org.bukkit.event.player
Class PlayerEditBookEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
org.bukkit.event.player.PlayerEditBookEvent
- All Implemented Interfaces:
- Cancellable
Called when a player edits or signs a book and quill item. If the event is
 cancelled, no changes are made to the BookMeta
- 
Nested Class SummaryNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFields inherited from class org.bukkit.event.player.PlayerEventplayer
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic @NotNull HandlerListGets the book meta that the player is attempting to add to the book.Gets the book meta currently on the book.intgetSlot()Deprecated, for removal: This API element is subject to removal in a future version.books may be signed from off handbooleanGets the cancellation state of this event.booleanGets whether the book is being signed.voidsetCancelled(boolean cancel) Sets the cancellation state of this event.voidsetNewBookMeta(@NotNull BookMeta newBookMeta) Sets the book meta that will actually be added to the book.voidsetSigning(boolean signing) Sets whether the book is being signed.Methods inherited from class org.bukkit.event.player.PlayerEventgetPlayerMethods inherited from class org.bukkit.event.EventcallEvent, getEventName, isAsynchronous
- 
Constructor Details- 
PlayerEditBookEvent
 
- 
- 
Method Details- 
getPreviousBookMetaGets the book meta currently on the book.Note: this is a copy of the book meta. You cannot use this object to change the existing book meta. - Returns:
- the book meta currently on the book
 
- 
getNewBookMetaGets the book meta that the player is attempting to add to the book.Note: this is a copy of the proposed new book meta. Use setNewBookMeta(BookMeta)to change what will actually be added to the book.- Returns:
- the book meta that the player is attempting to add
 
- 
getSlotDeprecated, for removal: This API element is subject to removal in a future version.books may be signed from off handGets the inventory slot number for the book item that triggered this event.This is a slot number on the player's hotbar in the range 0-8, or -1 for off hand. - Returns:
- the inventory slot number that the book item occupies
 
- 
setNewBookMetaSets the book meta that will actually be added to the book.- Parameters:
- newBookMeta- new book meta
- Throws:
- IllegalArgumentException- if the new book meta is null
 
- 
isSigningpublic boolean isSigning()Gets whether the book is being signed. If a book is signed the Material changes from BOOK_AND_QUILL to WRITTEN_BOOK.- Returns:
- trueif the book is being signed
 
- 
setSigningpublic void setSigning(boolean signing) Sets whether the book is being signed. If a book is signed the Material changes from BOOK_AND_QUILL to WRITTEN_BOOK.- Parameters:
- signing- whether the book is being signed.
 
- 
isCancelledpublic boolean isCancelled()Description copied from interface:CancellableGets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins- Specified by:
- isCancelledin interface- Cancellable
- Returns:
- trueif this event is cancelled
 
- 
setCancelledpublic void setCancelled(boolean cancel) Description copied from interface:CancellableSets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.- Specified by:
- setCancelledin interface- Cancellable
- Parameters:
- cancel-- trueif you wish to cancel this event
 
- 
getHandlers- Specified by:
- getHandlersin class- Event
 
- 
getHandlerList
 
-