Class PlayerRecipeBookClickEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
com.destroystokyo.paper.event.player.PlayerRecipeBookClickEvent
- All Implemented Interfaces:
- Cancellable
Called when a player clicks a recipe in the recipe book
- 
Nested Class SummaryNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFields inherited from class org.bukkit.event.player.PlayerEventplayer
- 
Constructor SummaryConstructorsConstructorDescriptionPlayerRecipeBookClickEvent(@NotNull Player player, @NotNull NamespacedKey recipe, boolean makeAll) 
- 
Method SummaryModifier and TypeMethodDescriptionstatic @NotNull HandlerListGets the namespaced key of the recipe that was clicked by the playerbooleanGets the cancellation state of this event.booleanGets a boolean which indicates whether or not the player requested to make the maximum amount of results.voidsetCancelled(boolean cancel) Sets the cancellation state of this event.voidsetMakeAll(boolean makeAll) Sets whether or not the maximum amount of results should be made.voidsetRecipe(@NotNull NamespacedKey recipe) Changes what recipe is requested.Methods inherited from class org.bukkit.event.player.PlayerEventgetPlayerMethods inherited from class org.bukkit.event.EventcallEvent, getEventName, isAsynchronous
- 
Constructor Details- 
PlayerRecipeBookClickEvent
 
- 
- 
Method Details- 
getRecipeGets the namespaced key of the recipe that was clicked by the player- Returns:
- The namespaced key of the recipe
 
- 
setRecipeChanges 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
 
- 
isMakeAllpublic 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:
- trueif shift is pressed while the recipe is clicked
 
- 
setMakeAllpublic 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-- trueif the request should attempt to make the maximum amount of results
 
- 
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:
- true if 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- true if you wish to cancel this event
 
- 
getHandlers- Specified by:
- getHandlersin class- Event
 
- 
getHandlerList
 
-