Package com.destroystokyo.paper.event.player

# Class PlayerRecipeBookClickEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
com.destroystokyo.paper.event.player.PlayerRecipeBookClickEvent

All Implemented Interfaces:
  `Cancellable`

public class PlayerRecipeBookClickEvent extends PlayerEvent implements Cancellable
Called when a player clicks a recipe in the recipe book

## Nested Class Summary

## Nested classes/interfaces inherited from class org.bukkit.event.Event

`Event.Result`

## Field Summary

### Fields inherited from class org.bukkit.event.player.PlayerEvent

`player`

## Constructor Summary

Constructors
Constructor
Description
`PlayerRecipeBookClickEvent(@NotNull Player player, @NotNull NamespacedKey recipe, boolean makeAll)`

## Method Summary

Modifier and Type
Method
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.

### Methods inherited from class org.bukkit.event.player.PlayerEvent

`getPlayer`

### Methods inherited from class org.bukkit.event.Event

`callEvent, getEventName, isAsynchronous`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### PlayerRecipeBookClickEvent

public PlayerRecipeBookClickEvent(@NotNull @NotNull Player player, @NotNull @NotNull NamespacedKey recipe, boolean makeAll)

## Method Details

### getRecipe

@NotNull public @NotNull NamespacedKey getRecipe()
Gets the namespaced key of the recipe that was clicked by the player

Returns:
  The namespaced key of the recipe

### setRecipe

public void setRecipe(@NotNull @NotNull NamespacedKey recipe)
Changes what recipe is requested. This sets the requested recipe to the recipe with the given key

Parameters:
  `recipe` - The key of the recipe that should be requested

### isMakeAll

public boolean isMakeAll()
Gets a boolean which indicates whether or not the player requested to make the maximum amount of results. This is true if shift is pressed while the recipe is clicked in the recipe book

Returns:
  `true` if shift is pressed while the recipe is clicked

### setMakeAll

public void setMakeAll(boolean makeAll)
Sets whether or not the maximum amount of results should be made. If this is true, the request is handled as if the player had pressed shift while clicking on the recipe

Parameters:
  `makeAll` - `true` if the request should attempt to make the maximum amount of results

### isCancelled

public boolean isCancelled()
Description copied from interface: `Cancellable`
Gets 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:
  `isCancelled` in interface `Cancellable`
Returns:
  true if this event is cancelled

### setCancelled

public void setCancelled(boolean cancel)
Description copied from interface: `Cancellable`
Sets 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:
  `setCancelled` in interface `Cancellable`
Parameters:
  `cancel` - true if you wish to cancel this event

### getHandlers

@NotNull public @NotNull HandlerList getHandlers()

Specified by:
  `getHandlers` in class `Event`

### getHandlerList

@NotNull public static @NotNull HandlerList getHandlerList()