Difference between revisions of "Configurations"

From SupaHam
Jump to: navigation, search
(List)
(Organized a bit more.)
Line 11: Line 11:
  
 
=Types=
 
=Types=
 +
==General==
 +
 +
===Boolean===
 +
This type can be either 0 or 1, true or false, yes or no, etc. This type is used to toggle states.
 +
 +
===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.
 +
 +
===Integer===
 +
This type can be any '''whole''' number, negative or positive, that does not have a fraction or decimal portion.
 +
 +
===List===
 +
This type is a Collection, you can give it more than one '''single type'''. An example for usage of List would be player names that should be allowed to build in an area.
  
==String==
+
===String===
 
This can be set to any arbitrary text.
 
This can be set to any arbitrary text.
  
Line 89: Line 105:
  
 
In addition, &k, &l, &m, &n, &o, and &r are 'obfuscated/magic', bold, strikethrough, underline, italic, and reset, respectively.
 
In addition, &k, &l, &m, &n, &o, and &r are 'obfuscated/magic', bold, strikethrough, underline, italic, and reset, respectively.
==General==
 
 
===List===
 
This type is a Collection, you can give it more than one '''single 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.
 
 
===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.
 
  
 
==Minecraft==
 
==Minecraft==
 
These are Minecraft related types.
 
These are Minecraft related types.
 +
 
===ItemStack===
 
===ItemStack===
 
This type represents an '''ItemStack''' that stores all properties of an item.
 
This type represents an '''ItemStack''' that stores all properties of an item.
Line 153: Line 151:
 
===Location===
 
===Location===
 
This type represents a '''Location''' that consists of an x, y, z coordinate and if necessary, direction too.
 
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.
 +
 
===Entity Type===
 
===Entity Type===
 
This type represents a Minecraft '''Entity Type''' through [https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html#enum_constant_summary Bukkit's enum names]. These don't necessarily have to be UPPERCASE as the provided value will always be converted into uppercase letters.
 
This type represents a Minecraft '''Entity Type''' through [https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html#enum_constant_summary Bukkit's enum names]. These don't necessarily have to be UPPERCASE as the provided value will always be converted into uppercase letters.

Revision as of 11:59, 28 January 2015

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

General

Boolean

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

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.

Integer

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

List

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

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.

Minecraft

These are Minecraft related types.

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

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.

Entity Type

This type represents a Minecraft Entity Type through Bukkit's enum names. These don't necessarily have to be UPPERCASE as the provided value will always be converted into uppercase letters.