How to create a collection

Its pretty easy to create a collection. Navigate to UltraCollections/collections and in the collections folder, simply create a new yml, for example, dirt.yml. Then, paste the code below in it, you can modify this as to your needs.


category

The category is important as that is where this collection will show up.


maxLevel

  • You need to set the maxLevel to the max level of the collection, this must match the xpRequirements section aswell!


giveXP

  • This is the amount of xp that will be given when the block is broken or picked up


collectionExecutor

executorType

  • There are 2 executor types, BY_BLOCK_BREAK and BY_PICKUP_ITEM. If the executor is BY_BLOCK_BREAK, the player will gain collection xp when breaking the block, and if its BY_PICKUP_ITEM, the player will gain collection xp by picking up the item defined.

itemstack

  • This itemstack can be modified in the config, or just go ingame and run the /collections setitem <collection> command when holding the item, and this will automatically update.


leaderboard

  • This is where you change the style/design of how the leaderboard looks.


commandRewards

  • You can configure command rewards here for each level, these will be executed when people level up to that level. You can make console or player execute them by adding either PLAYER or CONSOLE before the command.


xpRequirements

  • This is the XP required to level up to each level.


Structure and ingredients

Structure and ingredients are explained in How the GUI system works


levels

  • Here you can configure different levels

  • The rewards section is what is shown for level up message and in the GUI

  • Locked, unlocked and current item are the items for the level, there are these 3 so that you can fully customize them.

  • Actions are explained in How the GUI system works


Once you know all this, you can make the process faster by using our collections creator: https://pogmc.net/ultracollections/collection_creator.php


dirt.yml

maxLevel: 7
category: farming
displayName: '&aDirt'

giveXP: 3

collectionExecutor:
  executorType: BY_BLOCK_BREAK
  itemstack:
    ==: org.bukkit.inventory.ItemStack
    v: 3700
    type: DIRT

leaderboard:
  - '&a{playername} &f-> &6{level} &e({xp})'


commandRewards:
  '2':
    rewards:
      - PLAYER give %player% diamond 1
      - CONSOLE say %player% has leveled up!
  '3':
    rewards:
      - PLAYER give %player% gold_ingot 5
  '4':
    rewards:
      - PLAYER give %player% iron_ingot 5
  '5':
    rewards:
      - CONSOLE give %player% diamond 5
      - PLAYER give %player% diamond_shovel
# Add rewards for other levels as needed


xpRequirements:
  '1': 10.0
  '2': 20.0
  '3': 30.0
  '4': 100.0
  '5': 105.0
  '6': 110.0
  '7': 130.0
# Add XP requirements for other levels as needed

structure:
  - '# # # # ? # # # #'
  - '# # # # # # # # #'
  - '# L L L L L L L #'
  - '# # # # # # # # #'
  - '# # # # # # # # #'
  - '# # # B C N T # #'

locked_item:
  itemstack:
    ==: org.bukkit.inventory.ItemStack
    v: 3700
    type: RED_STAINED_GLASS_PANE
  displayName: "{collection_name} Level {collection_level}"
  lore:
    - '  &eProgress: {progress_percentage}'
    - '  &e{progress_bar}{currentxp}/{max_xp}'
    - '  &eRewards:'
    - '  {rewards}'


current_item:
  itemstack:
    ==: org.bukkit.inventory.ItemStack
    v: 3700
    type: YELLOW_STAINED_GLASS_PANE
  displayName: "{collection_name} Level {collection_level}"
  lore:
    - '  &eProgress: {progress_percentage}'
    - '  &e{progress_bar}{currentxp}/{max_xp}'
    - '  &eRewards:'
    - '  {rewards}'

unlocked_item:
  itemstack:
    ==: org.bukkit.inventory.ItemStack
    v: 2586
    type: GREEN_STAINED_GLASS_PANE
  displayName: "{collection_name} Level {collection_level}"
  lore:
    - '  &eProgress: {progress_percentage}'
    - '  &e{progress_bar}{currentxp}/{max_xp}'
    - '  &eRewards:'
    - '  {rewards}'

ingredients:
  filler:
    item_icon: '#'
    item_name: '&f'
    item-lore: []
    gui_item: BLACK_STAINED_GLASS_PANE
    custom_model_data: 1069

  collection_item:
    gui_item: Dirt
    item_name: '&aDirt Collection'
    item_icon: '?'
    custom_model_data: 1069
    item-lore:
      - '&7Viewing Dirt collection'

  back:
    gui_item: ARROW
    item_name: '&aGo Back'
    item_icon: B
    custom_model_data: 1069
    item-lore:
      - '&7to the'
      - '&7previous page'

  leaderboard:
    gui_item: DIAMOND
    item_name: '&aLeaderboard'
    item_icon: T
    custom_model_data: 1069
    item-lore:
      - '&7Top 10 players'
      - '{leaderboard}'


  next:
    gui_item: ARROW
    item_name: '&aNext'
    item_icon: N
    custom_model_data: 1069
    item-lore:
      - '&7Go to the'
      - '&7next page'

  close:
    gui_item: BARRIER
    item_name: '&cClose'
    item_icon: C
    item-lore: []
    actions:
      opengui: main
      play_sound:
        sound: ENTITY_ITEM_PICKUP
        volume: 1.0
        pitch: 1.0

levels:
  '1':
    rewards:
      - '  &eDirt Minion &7Recipe'
    locked_item:
      actions:
        send_message:
          message: You have not unlocked this yet!
    current_item:
      actions:
        send_message:
          message: You have not unlocked this yet!
    unlocked_item:
      actions:
        run_command:
          command: crafting open dirt_minion # example command
          as_op: true

Last updated