Configurations

From SupaHam
Revision as of 12:54, 20 May 2014 by SupaHam (Talk | contribs) (Added enchants and repair-cost to serialized example.)

Jump to: navigation, search

Format

Copied from: http://wiki.sk89q.com/wiki/WorldEdit/Configuration/Bukkit

The file is written in the YAML format and you must follow these guidelines:

  • Do not use tabs. You MUST use spaces or Bukkit will complain. If you use an editor like Notepad++ (recommended for Windows users), you must configure it to "replace tabs with spaces." In Notepad++, this can be changed in Settings > Preferences > Language Menu.
  • Don't get rid of the indents. They are indented so some entries are in categories (like "max-blocks-changed" is in the "limits" category.
  • If you want to check the format of this file before putting it into WorldEdit, paste it into http://yaml-online-parser.appspot.com/ and see if it gives "ERROR:".
  • Lines starting with # are comments and so they are ignored.

Types

String

This can be set to any arbitrary text.

Some strings support colour formatting. The following colour codes are:

Color code Color on white Color on black
&0 black black
&1 dark blue dark blue
&2 dark green dark green
&3 dark cyan/aqua dark cyan/aqua
&4 dark red dark red
&5 dark purple dark purple
&6 dark yellow (gold) dark yellow (gold)
&7 light grey light grey
&8 dark grey dark grey
&9 blue blue
&a green green
&b cyan/aqua cyan/aqua
&c red red
&d purple/pink purple/pink
&e yellow yellow
&f white white

In addition, &k, &l, &m, &n, &o, and &r are 'obfuscated/magic', bold, strikethrough, underline, italic, and reset, respectively.

List

This type is basically a Collection, you can give it more than one Type. An example for usage of List would be player names that should be allowed to build in an area.

Integer

This type can be any whole number, negative or positive, that does not have a fraction or decimal portion.

Double

This type is like an Integer, but accepts decimals and can store 15 digits.

Float

This type is like Double, but stores only 7 digits.

Boolean

This type can be either 0 or 1, true or false, yes or no, etc. This type is used to toggle states.

Location

This type represents a Location that consists of an x, y, z coordinate and if necessary, direction too.

String Location

This type represents a Location converted into a String. It consists of an x, y, and z coordinate. An example of a String Location would be "10,64,30" which when parsed would create a location with the x as 10, y as 64, and z as 30.

ItemStack

This type represents an ItemStack that stores all properties of an item. Data may chance depending on the item that is being serialized (stored). Here is a list of properties that can be stored with all items. The == represents the class that serialized the Object, in other words, the code that represents a Minecraft (Bukkit) Item. The meta-type is the type of metadata that belongs to the ItemStack. UNSPECIFIC represents a normal item, whereas something like LEATHER_ARMOR represents a leather armor item that contains details about its colour.

meta-type Special properties
BOOK Contains title, author, pages
SKULL Contains skull-owner
LEATHER_ARMOR Contains color
MAP Contains scaling
POTION Contains amplifier, ambient, duration, custom-effects, potion-id
ENCHANTED Contains stored-enchants
FIREWORK Contains Fireworks, power, firework-effects, Colors, Type, Trail, Flicker, FadeColors
FIREWORK_EFFECT Contains firework-effect
UNSPECIFIC Contains display-name, lore, enchants, repair-cost
   item:
     ==: org.bukkit.inventory.ItemStack
     type: STONE
     meta:
       ==: ItemMeta
       meta-type: UNSPECIFIC
       display-name: '§2Best stone in the whole world'
       lore:
       - '§e§lWithout this stone, mankind would not exist.'
       - '§eThis stone was discovered by professor SupaHam.'
       enchants:
         DAMAGE_ALL: 2
       repair-cost: 1