summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2013-01-14 08:14:20 +0000
committerKHobbits <rob@khobbits.co.uk>2013-01-14 08:14:42 +0000
commitf7a0f211450949040b5f2f144cb39df74c025674 (patch)
tree3ad85b347c0ee3eb6d19775da479ca8df40ba7a9
parent19d763f3160ab5095b495b267ede5be79bcc82ba (diff)
downloadEssentials-f7a0f211450949040b5f2f144cb39df74c025674.tar
Essentials-f7a0f211450949040b5f2f144cb39df74c025674.tar.gz
Essentials-f7a0f211450949040b5f2f144cb39df74c025674.tar.lz
Essentials-f7a0f211450949040b5f2f144cb39df74c025674.tar.xz
Essentials-f7a0f211450949040b5f2f144cb39df74c025674.zip
Switch book meta, to use 'book.txt', and 'book:<section>'.
Should make things clearer and easier to understand.
-rw-r--r--Essentials/src/book.txt18
-rw-r--r--Essentials/src/com/earth2me/essentials/MetaItemStack.java4
-rw-r--r--Essentials/src/config.yml4
3 files changed, 22 insertions, 4 deletions
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:<section> 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<String> 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.