ResultItemGiveFailEvent

class ResultItemGiveFailEvent(remainingResults: List<ItemStack>, val usedSupplierContext: ResultSupplier.Context?, isAsync: Boolean) : Event

Fired when CustomCrafterAPI fails to deliver one or more result items to the player (for example, when the player's inventory is full).

Use getResultsIfNotObtained to claim the remaining items and handle delivery yourself. Once claimed, subsequent calls to getResultsIfNotObtained return null.

This event is not cancellable.

Since

5.0.21

Parameters

remainingResults

The result items that could not be delivered

usedSupplierContext

The context used by the ResultSupplier that produced the items; null if unavailable

isAsync

Whether this event is fired from an asynchronous thread

Constructors

Link copied to clipboard
constructor(remainingResults: List<ItemStack>, usedSupplierContext: ResultSupplier.Context?, isAsync: Boolean)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
@get:NotNull
open val eventName: @NotNull String
Link copied to clipboard
open override val handlers: HandlerList
Link copied to clipboard

Functions

Link copied to clipboard
open fun callEvent(): Boolean
Link copied to clipboard
open override fun getHandlers(): HandlerList
Link copied to clipboard

Returns the undistributed items and marks them as obtained.

Link copied to clipboard

Returns whether the result items have already been claimed via getResultsIfNotObtained.