mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-10 12:59:54 +01:00
Add colour support to item meta.
This commit is contained in:
parent
d74952927a
commit
4ffe61a505
@ -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);
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user