Difference between revisions of "Configurations"

From SupaHam
Jump to: navigation, search
(Added types)
(Minecraft)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Format==
+
=Format=
  
 
Copied from: http://wiki.sk89q.com/wiki/WorldEdit/Configuration/Bukkit
 
Copied from: http://wiki.sk89q.com/wiki/WorldEdit/Configuration/Bukkit
Line 10: Line 10:
 
* Lines starting with # are comments and so they are ignored.
 
* Lines starting with # are comments and so they are ignored.
  
==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===
Line 90: Line 106:
 
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.
  
===List===
+
==Minecraft==
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.
+
These are Minecraft related types.
  
===Integer===
+
===ItemStack===
This type can be any '''whole''' number, negative or positive, that does not have a fraction or decimal portion.
+
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.
 +
{| class="wiki-table"
 +
! 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
  
===Double===
+
===Location===
This type is like an '''Integer''', but accepts decimals.
+
This type represents a '''Location''' that consists of an x, y, z coordinate and if necessary, direction too.
 
+
===Boolean===
+
A boolean can be 0 or 1, true or false, yes or no, etc. This type is used to toggle states.
+
  
 
===String Location===
 
===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.
 
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.
 +
 +
===EntityType===
 +
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.

Latest revision as of 15:25, 7 March 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.

EntityType

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.