From ada266a0f9a674508311b38cf9ec890484276d89 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Mon, 14 Jan 2013 08:14:20 +0000 Subject: [PATCH] Switch book meta, to use 'book.txt', and 'book:
'. Should make things clearer and easier to understand. --- Essentials/src/book.txt | 18 ++++++++++++++++++ .../com/earth2me/essentials/MetaItemStack.java | 4 ++-- Essentials/src/config.yml | 4 ++-- 3 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 Essentials/src/book.txt diff --git a/Essentials/src/book.txt b/Essentials/src/book.txt new file mode 100644 index 000000000..164910fb7 --- /dev/null +++ b/Essentials/src/book.txt @@ -0,0 +1,18 @@ +This is the book file. + +This file format works similar to the info.txt, motd.txt and rules.txt + +Place content in here that you would like to be used by books ingame. + +You can use this content by using the book:
meta option in kits or item spawning. + +#Colors +Minecraft colors: +&0 &&0 &1 &&1 &2 &&2 &3 &&3 +&4 &&4 &5 &&5 &6 &&6 &7 &&7 +&8 &&8 &9 &&9 &a &&a &b &&b +&c &&c &d &&d &e &&e &f &&f +&0 +&&k &kMagic&r &&l &lBold +&&m &mStrike&r &&n &nUline +&&o &oItalic&r &&r &rReset \ No newline at end of file diff --git a/Essentials/src/com/earth2me/essentials/MetaItemStack.java b/Essentials/src/com/earth2me/essentials/MetaItemStack.java index f7b78b5c8..e514f4df7 100644 --- a/Essentials/src/com/earth2me/essentials/MetaItemStack.java +++ b/Essentials/src/com/earth2me/essentials/MetaItemStack.java @@ -69,10 +69,10 @@ public class MetaItemStack throw new Exception("You can only set the owner of player skulls (397:3)"); } } - else if (split.length > 1 && split[0].equalsIgnoreCase("info") && stack.getType() == Material.WRITTEN_BOOK) + else if (split.length > 1 && split[0].equalsIgnoreCase("book") && stack.getType() == Material.WRITTEN_BOOK) { final BookMeta meta = (BookMeta)stack.getItemMeta(); - final IText input = new BookInput("info", true, ess); + final IText input = new BookInput("book", true, ess); final BookPager pager = new BookPager(input); List pages = pager.getPages(split[1]); diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index b12ed72c3..28b7e5b92 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -206,7 +206,7 @@ player-commands: # Note: All items MUST be followed by a quantity! # All kit names should be lower case, and will be treated as lower in permissions/costs. # Syntax: - itemID[:DataValue/Durability] Amount [Enchantment:Level].. [meta:value]... -# Supported meta includes: name, lore, color, player, title, author, info +# Supported meta includes: name, lore, color, player, title, author, book # 'delay' refers to the cooldown between how often you can use each kit, measured in seconds. # For more information, visit http://wiki.ess3.net/wiki/Command_Reference/ICheat#kits kits: @@ -231,7 +231,7 @@ kits: color: delay: 6000 items: - - 387 1 title:Book_o_Colors author:KHobbits lore:Ingame_color_codes info:Colors + - 387 1 title:Book_o_Colors 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.