Updated Scripts (markdown)

Daniel Saukel 2016-07-23 01:23:02 +02:00
parent 325e89f8fc
commit 993fcf3c63

@ -36,11 +36,16 @@ maxPlayersPerGroup: 4
```
## Classes
If players should not play the dungeon with their own items but with a set inventory, class scripts are the way to go. Just use a custom [ItemsXL](https://github.com/DRE2N/ItemsXL) item name or an item ID. The second number is the amount.
If players should not play the dungeon with their own items but with a set inventory, class scripts are the way to go. Thanks to the [CaliburnAPI](https://github.com/DRE2N/CaliburnAPI) / [ItemsXL](https://github.com/DRE2N/ItemsXL) integration, DungeonsXL supports three different ways to store items in configuration files.
In a dungeon, a class can be selected with a [classes sign](signs#classes).
```
items:
# 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.
- 261,1
- 262,64
- 268,1
@ -50,6 +55,41 @@ items:
- 301,1
- 364,3
- 363,10
- 261,1,16
# 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.
- ==: org.bukkit.inventory.ItemStack
type: IRON_SWORD
damage: 55
amount: 1
# 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
- ==: 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
# Whether the class should have a dog as a pet.
dog: true
```