Skip to content

Example: Loot Table Config File

robotnikthingy edited this page Sep 30, 2017 · 3 revisions

Loot tables specify what loot to load chests with. It uses a weighted chance system, meaning the chances for the items don't need to add up exactly to 100. You can also add items from the plugins Crackshot or MythicMobs to the loot table as well

Example

Loot:
#has a chance of placing a stack of between 1-5 stone blocks in the chest
  SomeItemNameHere:
    Type: item
    Material: STONE
    Chance: 80
    MinAmount: 1
    MaxAmount: 5
  #has a chance of placing a stack of between 1-5 grass blocks in the chest
  SomeItemNameHere2:
    Type: item
    ID: 2
    Chance: 50
    MinAmount: 1
    MaxAmount: 5
  SomeItemNameHere3:
    Type: item
    Material: WOOL
    Chance: 20
    MinAmount: 1
    MaxAmount: 5
  #has a chance of putting 1 Overpowered Sword with custom lore, enchantments, etc
  AwesomeDamagedOverpoweredSword:
    Type: item
    Material: DIAMOND_SWORD
    Data: 5
    Display: "Overpowered Sword"
    Lore:
    -"KILLS EVERYTHING"
    -"AHHHHHH"
    Enchantments:
    - DAMAGE_ALL:2
    - DURABILITY:5
    - KNOCKBACK:5
    HideAttributes: true
    Unbreakable: true
    Chance: 1
    MinAmount: 1
    MaxAmount: 1
Options:
  #MaxItems - the maximum amount of items which will be placed in the chest
  #MinItems - the minimum amount of items which will be placed in the chest
  MaxItems: 15
  MinItems: 2

Example with CrackShot and MythicMobs items

Loot:
#has a chance of placing a stack of between 1-5 stone blocks in the chest
  #has a chance of placing a stack of between 1-3 grenades from the CrackShot plugin in the chest
  Gun:
    Type: crackshotitem
    Name: Grenade
    Chance: 5
    MinAmount: 1
    MaxAmount: 3
  #has a chance of putting 1 Skeleton King sword from MythicMobs in the chest
  Mythicmobsitem:
    Type: mythicmobsitem
    Name: SkeletonKingSword
    Chance: 20
    MinAmount: 1
    MaxAmount: 1
Options:
  #MaxItems - the maximum amount of items which will be placed in the chest
  #MinItems - the minimum amount of items which will be placed in the chest
  MaxItems: 15
  MinItems: 2

Example with head using a custom texture

Loot:
#has a chance of placing a stack of between 1-5 stone blocks in the chest
  #has a chance of placing a stack of between 1-3 of Notch's head
  NotchsHead:
    Type: item
    Material: SKULL_ITEM
    Data: 3
    Chance: 20
    MinAmount: 1
    MaxAmount: 3
    PlayerTexture: Notch
Options:
  #MaxItems - the maximum amount of items which will be placed in the chest
  #MinItems - the minimum amount of items which will be placed in the chest
  MaxItems: 5
  MinItems: 2