Items

Explanation of Items.yml

The Items.yml file in the AFK Rewards plugin allows you to define custom items, including those with NBT (Named Binary Tag) data, which means you can create unique and personalized items for your players. Below is an explanation of the example items defined in the Items.yml file:

(this is by default)

items:
  test3:
    ==: org.bukkit.inventory.ItemStack
    v: 3337
    type: STONE_AXE
    meta:
      ==: ItemMeta
      meta-type: UNSPECIFIC
      display-name: '{"extra":[{"bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"color":"light_purple","text":"AFK Wand"}],"text":""}'
      lore:
      - '{"extra":[{"bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"color":"red","text":"Set position 1 and 2 with this magic wand!"}],"text":""}'

To create a custom item like test3 in the AFK Rewards plugin, follow these steps:

  1. Access the AFK Rewards GUI by typing /tafk in the chat.

  2. In the GUI, choose the chest called "Item". This will allow you to create a new custom item.

  3. Hold the item you want to use as a base for the custom item in your main hand (your active item slot).

  4. Click on the item named "Item" in the GUI to create a new custom item. A prompt will appear asking you to enter a name for the custom item.

  5. Enter the name for the custom item.

  6. The plugin will now create a new item in the Items.yml file with the name, and it will inherit the attributes of the item you were holding in your main hand.

The custom item will be defined in the Items.yml file as shown below:

Last updated