Class BoxCraftEvent
java.lang.Object
net.okocraft.box.api.event.BoxEvent
net.okocraft.box.feature.craft.event.BoxCraftEvent
- All Implemented Interfaces:
- Cancellable
An event that called when the 
Player is crafting items in Box.- 
Constructor SummaryConstructorsConstructorDescriptionBoxCraftEvent(@NotNull Player crafter, @NotNull SelectedRecipe selectedRecipe, int times) The constructor ofBoxCraftEvent.
- 
Method SummaryModifier and TypeMethodDescription@NotNull PlayerGets the player who is trying to craft.@NotNull SelectedRecipeGets the recipe to craft.intgetTimes()Gets the number of times to craft.booleanGets if the event has been cancelled.voidsetCancelled(boolean cancel) Sets the cancel status of the event.@NotNull StringCreates the debug log from this event.toString()
- 
Constructor Details- 
BoxCraftEventpublic BoxCraftEvent(@NotNull @NotNull Player crafter, @NotNull @NotNull SelectedRecipe selectedRecipe, int times) The constructor ofBoxCraftEvent.- Parameters:
- crafter- the- Playerwho craft items
- selectedRecipe- the- SelectedRecipeused to craft items
- times- the number of times crafted
 
 
- 
- 
Method Details- 
getCrafterGets the player who is trying to craft.- Returns:
- the player who is trying to craft
 
- 
getSelectedRecipeGets the recipe to craft.- Returns:
- the recipe to craft
 
- 
getTimespublic int getTimes()Gets the number of times to craft.- Returns:
- the number of times to craft
 
- 
isCancelledpublic boolean isCancelled()Description copied from interface:CancellableGets if the event has been cancelled.- Specified by:
- isCancelledin interface- Cancellable
- Returns:
- trueif canceled,- falseotherwise.
 
- 
setCancelledpublic void setCancelled(boolean cancel) Description copied from interface:CancellableSets the cancel status of the event.- Specified by:
- setCancelledin interface- Cancellable
- Parameters:
- cancel-- trueto cancel,- falseto not.
 
- 
toString
- 
toDebugLogDescription copied from class:BoxEventCreates the debug log from this event.- Overrides:
- toDebugLogin class- BoxEvent
- Returns:
- the debug log
 
 
-