Class RecipeCraftEvent

java.lang.Object
org.bukkit.event.Event
dev.itsharshxd.zentrix.api.events.ZentrixEvent
dev.itsharshxd.zentrix.api.events.recipe.RecipeCraftEvent

public final class RecipeCraftEvent extends ZentrixEvent
Called after a custom recipe was crafted or cooked and Zentrix counted it towards its limit.

A notification: the result has been made, the runtime-game counter that RecipeService#getGlobalCraftCount reads has been advanced, and any crafting reward is on its way. A block that cooked on its own reports no player. Main thread; only fired while a listener is registered.

Since:
1.8.0
  • Nested Class Summary

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

    org.bukkit.event.Event.Result
  • Constructor Summary

    Constructors
    Constructor
    Description
    RecipeCraftEvent(@NotNull ZentrixRecipe recipe, @Nullable org.bukkit.entity.Player player, @Nullable org.bukkit.World world)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static @NotNull org.bukkit.event.HandlerList
     
    @NotNull org.bukkit.event.HandlerList
    Gets the handler list for this event.
    @NotNull Optional<org.bukkit.entity.Player>
    The crafting player; empty when a block cooked on its own.
    @NotNull ZentrixRecipe
    The custom recipe.
    @NotNull Optional<org.bukkit.World>
    The world it was made in, when known.

    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

    • RecipeCraftEvent

      public RecipeCraftEvent(@NotNull @NotNull ZentrixRecipe recipe, @Nullable @Nullable org.bukkit.entity.Player player, @Nullable @Nullable org.bukkit.World world)
  • Method Details

    • getRecipe

      @NotNull public @NotNull ZentrixRecipe getRecipe()
      The custom recipe.
    • getPlayer

      @NotNull public @NotNull Optional<org.bukkit.entity.Player> getPlayer()
      The crafting player; empty when a block cooked on its own.
    • getWorld

      @NotNull public @NotNull Optional<org.bukkit.World> getWorld()
      The world it was made in, when known.
    • getHandlers

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Description copied from class: ZentrixEvent
      Gets the handler list for this event.
      Overrides:
      getHandlers in class ZentrixEvent
      Returns:
      The handler list
    • getHandlerList

      @NotNull public static @NotNull org.bukkit.event.HandlerList getHandlerList()