From 9b0c8cd571e1cabf627019bec99469c874dc669d Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Sun, 24 Jul 2016 13:50:07 +0200 Subject: [PATCH] Updated Scripts (markdown) --- Scripts.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/Scripts.md b/Scripts.md index 00cdb91..2f95e95 100644 --- a/Scripts.md +++ b/Scripts.md @@ -6,6 +6,7 @@ A *script* is a [YAML](https://en.wikipedia.org/wiki/YAML) file located at _plug 2. [Classes](#classes) 3. [Mobs](#mobs) 4. [Signs](#signs) +5. [Loot tables](#loot-tables) *** @@ -161,4 +162,57 @@ Sometimes, it is hard to put all the triggers at one tiny line of a sign. And so - "Spider" - "0,1" - "D 4" -``` \ No newline at end of file +``` + +## Loot tables +``` +0: + # For more information about the Caliburn item serialization format, + # please have a look at the Caliburn wiki: + # https://github.com/DRE2N/CaliburnAPI/wiki/Custom-item-script + item: + ==: io.github.dre2n.caliburn.item.UniversalItemStack + type: "CUSTOM_DEFAULT" + material: "IRON_SWORD" + durability: 35 + name: "&4CustomName" + amount: 1 + lores: + - "&4This is the first line." + - "&6This is the second line." + enchantments: + "PROTECTION_ENVIRONMENTAL": 4 + "THORNS": 1 + attributes: + name: + type: "GENERIC_ATTACK_DAMAGE" + slots: + - "MAIN_HAND" + - "HEAD" + operation: "ADD_NUMBER" + amount: 8.5 + # The loot chance in percent + chance: 75.0 + +1: + # This is the simple way to store items. + # Valid input: + # The first value may be any ID (be it a Vanilla ID or an ID of an ItemsXL item), + # the second value is the amount + # and the third, optional value is the durability value. + item: "261,1,16" + chance: 100.0 + +2: + # The Caliburn API also supports the usual Bukkit ItemStack deserialization format. + # If you don't know how to use this and have ItemsXL installed, + # put the item stack into your main hand and enter the "/ixl serialize" command. + # You will find a valid, automatically generated YAML representation of your item + # in the ItemsXL/serialized.yml file. + item: + ==: org.bukkit.inventory.ItemStack + type: IRON_SWORD + damage: 55 + amount: 1 + chance: 37.5 +```