summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2013-01-14 21:34:35 +0000
committerKHobbits <rob@khobbits.co.uk>2013-01-14 21:34:35 +0000
commit4ffe61a5053b2418f3efc9a882c88c8df71902b5 (patch)
tree19d4dc58711457d85660b116eca3d58dcfb0e269
parentd74952927a03e8461b5f76b1ff2dbdacd53f145c (diff)
downloadEssentials-4ffe61a5053b2418f3efc9a882c88c8df71902b5.tar
Essentials-4ffe61a5053b2418f3efc9a882c88c8df71902b5.tar.gz
Essentials-4ffe61a5053b2418f3efc9a882c88c8df71902b5.tar.lz
Essentials-4ffe61a5053b2418f3efc9a882c88c8df71902b5.tar.xz
Essentials-4ffe61a5053b2418f3efc9a882c88c8df71902b5.zip
Add colour support to item meta.
-rw-r--r--Essentials/src/com/earth2me/essentials/MetaItemStack.java6
-rw-r--r--Essentials/src/config.yml6
2 files changed, 6 insertions, 6 deletions
diff --git a/Essentials/src/com/earth2me/essentials/MetaItemStack.java b/Essentials/src/com/earth2me/essentials/MetaItemStack.java
index e514f4df7..6a0257c8b 100644
--- a/Essentials/src/com/earth2me/essentials/MetaItemStack.java
+++ b/Essentials/src/com/earth2me/essentials/MetaItemStack.java
@@ -39,7 +39,7 @@ public class MetaItemStack
if (split.length > 1 && split[0].equalsIgnoreCase("name"))
{
- final String displayName = split[1].replace('_', ' ');
+ final String displayName = Util.replaceFormat(split[1].replace('_', ' '));
final ItemMeta meta = stack.getItemMeta();
meta.setDisplayName(displayName);
stack.setItemMeta(meta);
@@ -49,7 +49,7 @@ public class MetaItemStack
final List<String> lore = new ArrayList<String>();
for (String line : split[1].split("\\|"))
{
- lore.add(line.replace('_', ' '));
+ lore.add(Util.replaceFormat(line.replace('_', ' ')));
}
final ItemMeta meta = stack.getItemMeta();
meta.setLore(lore);
@@ -89,7 +89,7 @@ public class MetaItemStack
}
else if (split.length > 1 && split[0].equalsIgnoreCase("title") && stack.getType() == Material.WRITTEN_BOOK)
{
- final String title = split[1];
+ final String title = Util.replaceFormat(split[1].replace('_', ' '));
final BookMeta meta = (BookMeta)stack.getItemMeta();
meta.setTitle(title);
stack.setItemMeta(meta);
diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml
index 28b7e5b92..fb91f18f0 100644
--- a/Essentials/src/config.yml
+++ b/Essentials/src/config.yml
@@ -220,9 +220,9 @@ kits:
dtools:
delay: 600
items:
- - 278 1 efficiency:1 durability:1 fortune:1 name:Gigadrill lore:The_drill_that_pierces|the_heavens
+ - 278 1 efficiency:1 durability:1 fortune:1 name:&4Gigadrill lore:The_drill_that_&npierces|the_heavens
- 277 1 digspeed:3 name:Dwarf lore:Diggy|Diggy|Hole
- - 298 1 color:255|255|255 name:Top_hat lore:Good_day,_Good_day
+ - 298 1 color:255|255|255 name:Top_Hat lore:Good_day,_Good_day
- 279:780 1
notch:
delay: 6000
@@ -231,7 +231,7 @@ kits:
color:
delay: 6000
items:
- - 387 1 title:Book_o_Colors author:KHobbits lore:Ingame_color_codes book:Colors
+ - 387 1 title:&4Book_&9o_&6Colors author:KHobbits lore:Ingame_color_codes book:Colors
# Essentials Sign Control
# See http://wiki.ess3.net/wiki/Sign_Tutorial for instructions on how to use these.