Class QuestBook

Create a quest book.

Constructors

  • Parameters

    • id: string

      The unique id of the QuestBook.

    • title: string | RawMessage

      Title of the QuestBook.

    • body: string | RawMessage

      Body of the QuestBook.

    • options: QuestBookOptions

      Options of the quest book.

    • OptionaliconPath: string

      The icon of the book. It should be the path from the root of the resource pack.

      texture/gui/example_pic
      

    Returns QuestBook

Properties

body: string | RawMessage

Body of the QuestBook.

iconPath?: string

The icon of the book. It should be the path from the root of the resource pack.

texture/gui/example_pic
id: string

The unique id of the QuestBook.

Options of the quest book.

title: string | RawMessage

Title of the QuestBook.

Methods

  • Add a quest.

    Parameters

    • quest: Quest
    • Optionalmessage: string | RawMessage

      Optional information will be sent to world.

    Returns void

  • Display the book to the player.

    Parameters

    Returns void

  • Get the quest by id.

    Parameters

    • id: string

    Returns undefined | Quest

  • Get all quests.

    Returns Quest[]

  • Registry the prop.

    Returns void

    Use Register.questRegistry() to registry the prop