Class DurabilityLimitedProp

A prop (an item that can be used) , Its durability is consumed after use.

Hierarchy (view full)

  • Prop
    • DurabilityLimitedProp

Constructors

Properties

Methods

Constructors

  • Parameters

    • typeId: string

      Identifier of the type of items for the stack. If a namespace is not specified, 'minecraft:' is assumed.

    • durabilityValue: number

      The durability to be consumed.

    • OptionaluseEvent: ((arg: ItemUseAfterEvent) => void)

      The event when an item is successfully used by a player.

        • (arg): void
        • Parameters

          • arg: ItemUseAfterEvent

          Returns void

    Returns DurabilityLimitedProp

Properties

durabilityValue: number

The durability to be consumed.

typeId: string

Identifier of the type of items for the stack. If a namespace is not specified, 'minecraft:' is assumed.

useEvent?: ((arg: ItemUseAfterEvent) => void)

The event when an item is successfully used by a player.

Methods

  • Registry the prop.

    Returns void

    Use Register.propRegistry() to registry the prop