public class PlayerLecternPageChangeEvent extends PlayerEvent implements Cancellable
| Modifier and Type | Class and Description |
|---|---|
static class |
PlayerLecternPageChangeEvent.PageChangeDirection |
Event.Resultplayer| Constructor and Description |
|---|
PlayerLecternPageChangeEvent(@NotNull Player player,
@NotNull Lectern lectern,
@NotNull ItemStack book,
@NotNull PlayerLecternPageChangeEvent.PageChangeDirection pageChangeDirection,
int oldPage,
int newPage) |
| Modifier and Type | Method and Description |
|---|---|
@NotNull ItemStack |
getBook()
Gets the current ItemStack on the lectern.
|
static @NotNull HandlerList |
getHandlerList() |
@NotNull HandlerList |
getHandlers() |
@NotNull Lectern |
getLectern()
Gets the lectern involved.
|
int |
getNewPage()
Gets the page changed to.
|
int |
getOldPage()
Gets the page changed from.
|
@NotNull PlayerLecternPageChangeEvent.PageChangeDirection |
getPageChangeDirection()
Gets the page change direction.
|
boolean |
isCancelled()
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancel)
Sets the cancellation state of this event.
|
void |
setNewPage(int newPage)
Sets the page changed to.
|
getPlayercallEvent, getEventName, isAsynchronous@NotNull public @NotNull Lectern getLectern()
@NotNull public @NotNull ItemStack getBook()
@NotNull public @NotNull PlayerLecternPageChangeEvent.PageChangeDirection getPageChangeDirection()
public int getOldPage()
public int getNewPage()
public void setNewPage(int newPage)
newPage - the new paged changed topublic boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancel)
CancellablesetCancelled in interface Cancellablecancel - true if you wish to cancel this event@NotNull public @NotNull HandlerList getHandlers()
getHandlers in class Event@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2021. All rights reserved.