kItemBehavior

fun kItemBehavior(identifier: KIdentifier, block: ItemStack.(context: KItemBehaviorContext) -> Unit): KItemBehavior

Creates a new KItemBehavior instance and defines its behavior logic.

Return

A KItemBehavior instance with the specified identifier and configured behavior logic.

Parameters

identifier

The unique identifier for the behavior, detailing the plugin and identifier string.

block

A lambda function defining the behavior logic for ItemStack with a given context of type KItemBehaviorContext.