Interface: ItemCustomComponent
Contains a set of events that will be raised for an item. This object must be bound using the ItemComponentRegistry.
Properties
onBeforeDurabilityDamage()?
optional
onBeforeDurabilityDamage: (arg
) =>void
Parameters
Parameter | Type |
---|---|
arg | ItemComponentBeforeDurabilityDamageEvent |
Returns
void
onCompleteUse()?
optional
onCompleteUse: (arg
) =>void
Parameters
Parameter | Type |
---|---|
arg | ItemComponentCompleteUseEvent |
Returns
void
onConsume()?
optional
onConsume: (arg
) =>void
Parameters
Parameter | Type |
---|---|
arg | ItemComponentConsumeEvent |
Returns
void
onHitEntity()?
optional
onHitEntity: (arg
) =>void
Parameters
Parameter | Type |
---|---|
arg | ItemComponentHitEntityEvent |
Returns
void
onMineBlock()?
optional
onMineBlock: (arg
) =>void
Remarks
This function will be called when an item containing this component is used to mine a block.
Parameters
Parameter | Type |
---|---|
arg | ItemComponentMineBlockEvent |
Returns
void
onUse()?
optional
onUse: (arg
) =>void
Remarks
This function will be called when an item containing this component is used by a player.
Parameters
Parameter | Type |
---|---|
arg | ItemComponentUseEvent |
Returns
void
onUseOn()?
optional
onUseOn: (arg
) =>void
Parameters
Parameter | Type |
---|---|
arg | ItemComponentUseOnEvent |
Returns
void