Class WeightGiftItem

A Weight-Driven random reward gift.

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.

    • data: RewardWeightData[]

      Data of the gift, including its reward and weight.

    Returns WeightGiftItem

Properties

Data of the gift, including its reward and weight.

typeId: string

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

Methods

  • Give reward to a player.

    Parameters

    • player: Player

    Returns void

  • Registry the gift.

    Returns void

    Use Register.giftRegistry() to registry the gift.