public class PlayerLecternPageChangeEvent extends PlayerEvent implements Cancellable
Modifier and Type | Class and Description |
---|---|
static class |
PlayerLecternPageChangeEvent.PageChangeDirection |
Event.Result
player
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.
|
getPlayer
callEvent, 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()
Cancellable
isCancelled
in interface Cancellable
public void setCancelled(boolean cancel)
Cancellable
setCancelled
in interface Cancellable
cancel
- 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.