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 Summary
ConstructorsConstructorDescriptionBoxCraftEvent(@NotNull org.bukkit.entity.Player crafter, @NotNull SelectedRecipe selectedRecipe, int times) The constructor ofBoxCraftEvent. -
Method Summary
Modifier and TypeMethodDescription@NotNull org.bukkit.entity.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
-
BoxCraftEvent
public BoxCraftEvent(@NotNull @NotNull org.bukkit.entity.Player crafter, @NotNull @NotNull SelectedRecipe selectedRecipe, int times) The constructor ofBoxCraftEvent.- Parameters:
crafter- thePlayerwho craft itemsselectedRecipe- theSelectedRecipeused to craft itemstimes- the number of times crafted
-
-
Method Details
-
getCrafter
@NotNull public @NotNull org.bukkit.entity.Player getCrafter()Gets the player who is trying to craft.- Returns:
- the player who is trying to craft
-
getSelectedRecipe
Gets the recipe to craft.- Returns:
- the recipe to craft
-
getTimes
public int getTimes()Gets the number of times to craft.- Returns:
- the number of times to craft
-
isCancelled
public boolean isCancelled()Description copied from interface:CancellableGets if the event has been cancelled.- Specified by:
isCancelledin interfaceCancellable- Returns:
trueif canceled,falseotherwise.
-
setCancelled
public void setCancelled(boolean cancel) Description copied from interface:CancellableSets the cancel status of the event.- Specified by:
setCancelledin interfaceCancellable- Parameters:
cancel-trueto cancel,falseto not.
-
toString
-
toDebugLog
Description copied from class:BoxEventCreates the debug log from this event.- Overrides:
toDebugLogin classBoxEvent- Returns:
- the debug log
-