Skip to content

Configurations: Tree configurations

Rowan edited this page Jul 28, 2022 · 8 revisions

On this page, you will find all the information about tree configurations.

The advancement-trees directory

In this directory, you will place the yml files of the trees you want in your server. The name of this file will be the identifier for the tree, make sure the name has no spaces in it otherwise you'll not be able to access it using commands!!

The tree configuration

The tree configuration has two parts, the options section, and the advancements section.

The options section

The options section includes the options for the entire tree and rewards that should be given when all advancements in the tree are completed. This is how an options section looks like:

options:
  auto_active: false
  rewards:
    command:
      type: consolecommand
      value: broadcast %player% completed all advancements! Congratulate them!
  display_name: Example tree!
  description: '&eAn tree filled with examples.'
  item: OAK_SAPLING
  item-data:
     damage: 12
     flags: 
        - HIDE_UNBREAKABLE
     custommodeldata: 1
     unbreakable: true
     glowing: false
  gui_location: auto
  minecraft-gui-display: true
  minecraft-gui-background: "textures/block/anvil.png"

auto_active

This is a true/false value if all the advancements in this tree should be automatically activated once all requirements are met.

rewards

Here you can list all rewards that the user will be given once all advancements in this tree are completed (see reward configurations).

display_name

This is the name displayed in the GUIs of this tree.

description

This is the description displayed in the GUIs of this tree.

item

This is the item this tree is displayed as, you can fill in any item in the Spigot materials enum for your Minecraft version: link.

item-data (since v1.1.4)

This is the extra data an item can have, damage is an integer for how much durability is left on the item, this is used often in older versions to give items a custom texture. flags is a string list of item flags, can be found on Spigot API Docs. unbreakable makes an item unbreakable. glowing lets an item glow like it's enchanted. custommodeldata is an integer for custom model data, the modern way to give items a custom texture.

gui_location

This is the location of this tree in the trees GUI, this can be set to a value formatted as page:index for example 1:12 (this will put this tree on the first page on the 13th slot) or to auto to put it on the first free slot in the GUI.

minecraft-gui-display (Since v1.0)

This is a boolean to indicate whether to show this advancement tree in the Minecraft advancement GUI.

minecraft-gui-background (Since v1.0)

This is a string to set the background of the Minecraft advancement GUI, this is only used when minecraft-gui-display is true. This must be a texture reference to an existing texture (e.g. a block), valid values for this could be "textures/block/dirt.png", "textures/block/diamond_block.png" etc.

Advancements section

Here you list all advancements belonging to this tree, this is how such a configuration looks like:

advancements:
  breaksomething:
   (advancement configuration)
  dosomething:
   (advancement configuration)

In this example breaksomething and dosomething are the identifiers for an advancement, you can put an unlimited amount of advancements in one tree! For information on how to configure an advancement see Advancement configurations