Class GiftItem

Define a gift item.

Hierarchy (view full)

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.

    • reward: RewardType

      Rewards of the gift.

    Returns GiftItem

Properties

reward: RewardType

Rewards of the gift.

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.