public class PlayerRecipeBookClickEvent extends PlayerEvent implements Cancellable
Event.Result
player
Constructor and Description |
---|
PlayerRecipeBookClickEvent(@NotNull Player player,
@NotNull NamespacedKey recipe,
boolean makeAll) |
Modifier and Type | Method and Description |
---|---|
static @NotNull HandlerList |
getHandlerList() |
@NotNull HandlerList |
getHandlers() |
@NotNull NamespacedKey |
getRecipe()
Gets the namespaced key of the recipe that was clicked by the player
|
boolean |
isCancelled()
Gets the cancellation state of this event.
|
boolean |
isMakeAll()
Gets a boolean which indicates whether or not the player requested to make the maximum amount of results.
|
void |
setCancelled(boolean cancel)
Sets the cancellation state of this event.
|
void |
setMakeAll(boolean makeAll)
Sets whether or not the maximum amount of results should be made.
|
void |
setRecipe(@NotNull NamespacedKey recipe)
Changes what recipe is requested.
|
getPlayer
callEvent, getEventName, isAsynchronous
@NotNull public @NotNull NamespacedKey getRecipe()
public void setRecipe(@NotNull @NotNull NamespacedKey recipe)
recipe
- The key of the recipe that should be requestedpublic boolean isMakeAll()
true
if shift is pressed while the recipe is clickedpublic void setMakeAll(boolean makeAll)
makeAll
- true
if the request should attempt to make the maximum amount of resultspublic 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.