Writable
Important: this plugin has been developed for Minecraft 1.2.5 and may or may not work with newer versions!
If you are a developer and want to continue and update this plugin, feel free to – full source is available under a permissive license.
If you're a user or an interested developer, please see this post for further information.
Writable - write on paper, no chat commands required!
A new plugin for writing and reading text on paper, with a twist of realism.
Features:
- No chat commands needed
- No client modifications needed
- Requires a writing implement to write
- Requires a hard surface to write
- Requires ink to write
- Supports multiple colors using different inks
- Inks can be consumed when used for writing (optional)
- Magic ink
- Configurable writing implements, surfaces, and ink colors
Download Writable 1.2 - released on 2012/05/20 for 1.2.5-R2.0
Usage
To write, you will need paper and:
- a writing implement (example: feather)
- a writing surface (examples: stone or wood, not gravel or grass)
- ink (example: dandelion yellow)
Ensure the writing implement is in your inventory hotbar, directly next to the ink you want to write with, then while holding the paper simply double right-click on a temporary writing surface present somewhere in the environment.
A text entry dialog will appear, and you can type your story.
To read a piece of paper, either left-click while holding the paper, or simply hold it in your hand and the text will be displayed in the chat (autoRead configuration option).
Support
Writing Implements
Feathers are the most logical choice of writing instrument, but several items are supported:
- Feather
- Stick
- Blaze rod
- Arrow
All function equivalently.
Writing Surfaces
Almost any reasonable hard surface is acceptable as a writing surface. Think of if you could place paper on it and write on the surface in real life. Trying to hold your paper on, say, gravel or grass, and write on it would not be very realistic. Stone, wood, and most other solid surfaces are allowed by default.
Currently, not all logical writing surfaces are allowed -- crafting tables, for example, will invoke the crafting grid instead.
Inks
- Rose Red (dark red)
- Dandelion Yellow (yellow)
- Lapis Lazuli (blue)
- Cactus Green (dark green)
- Ink Sac (black)
- Bone Meal (white)
- Cyan Dye (blue)
- Purple Dye (light purple)
- Gray Dye (dark gray)
- Light Blue Dye (aqua)
- Pink Dye (red)
- Lime Dye (green)
- Magenta Dye (dark purple)
- Light Gray Dye (gray)
- Coal (dark gray)
- Charcoal (dark gray)
- Glowstone Dust (gold)
- Redstone Dust (magic)
Inks are optionally consumed when used (consumeInk configuration option).
Magic ink displays randomly alternating characters (same as used in The End credits). It can be decoded to randomly colored text by reading the paper while a dragon egg is in your inventory (configurable to any material; see the magicInkDecoder option).
Technical Details
Writable listens for several consecutive events in order to cause "double right-click paper" to show a text entry dialog. First, right-clicking the paper triggers a player interaction event, and Writable quickly replaces the paper with a temporary sign item. The second right-click places the sign, triggering a block place event, and then a sign change event after the player completes the text entry.
Once the temporary sign is placed, the text is captured, written to the paper, the sign is removed from the environment, and the paper is restored in the player's inventory slot. If all goes well, these processes behind the scenes should not be too noticeable nor immersion-breaking to the player. This technique was conceived so that writing is possible without resorting to /commands.
Limitations
By design, the text is limited to approximately one chat window screenful per piece of paper. After all, it is paper, not a book.
The writing is in permanent ink; it isn't erasable. To start over, you have to use a new paper.
For a more sophisticated text writing/reading plugin, see also BookWorm.
Not much interest in this plugin I'm expecting now that Minecraft 1.3 has books in vanilla.
Although, Writable's books do offer some other interesting features over Minecraft's books. If anyone wants to use of this code in their plugins, or continue this plugin itself, feel free to - more information at http://forums.bukkit.org/threads/takeover-silkspawners-enchantmore-chestpack-pickuparrows-radiobeacon-quickbench-potionsplus-more.91593/
Will there be a way to "trash" paper? I don't like having a bunch of text files, and not knowing which pieces of paper have been burned or incinerated.
@flyingflare
Yes, see the 'writingImplements' and 'inks' section in config.yml. Added support for using charcoal (in addition to coal) in Writable 1.1, just released. You can remove or alter the implements/surfaces/inks in the config as desired.
@roadslide42
@Minnhee
@MinecraftJesus
Should be fixed in Writable 1.1, didn't see it during my testing since I usually have a full hotbar :).
@roadslide42
Can you paste your server console log? Its working for me with Writable 1.1 on CraftBukkit 1.2.5-R1.0.
I have the same error as the other two.... Should I post a ticket?
I'm wondering if the writing tools can be changed in the config? For example, I prefer to be able to use only feathers and charcoal for writing with.
Thanks!
I also go the same error as roadslide42 ):
10:00:46 [SEVERE] Could not pass event PlayerInteractEvent to Writable
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:303)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:459)
at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:176)
at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:287)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:636)
at net.minecraft.server.Packet15Place.handle(SourceFile:39)
at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:113)
at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:551)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:449)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
Caused by: java.lang.NullPointerException
at me.exphc.Writable.Writable.isWritingImplement(Writable.java:704)
at me.exphc.Writable.Writable.findImplementSlot(Writable.java:672)
at me.exphc.Writable.WritablePlayerListener.onPlayerInteract(Writable.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301)
... 12 more
if i could get it to work, i would make a video on it. but when i double right-click on stone with the paper and have a feather, and blue dye in my hotbar, it doesn't do anything
@re4397
For screenshots see the images link :). No videos yet.. anyone want to make one?
please add videos or screenshots
@Jendon23
Added left-click to read paper, and option to turn off automatically reading the paper when held ("autoRead" option, default on).
How do you mean about the paper organization? Writable attempts to change the stackability of paper to avoid combining different papers into one stack, thus losing their identity.
Great idea about decoding magic ink, why didn't I think of that :). Added magic ink decoding when you have a special item in your inventory (I set it to dragon egg, but can be changed in the config). Submitted in Writable 0.3, should be available on BukkitDev soon.
This plugin is great! But the reading part seems a bit intrusive, could you make it so that you have to right click a paper once to read it? Also, the way it organizes paper by numbers seems odd, I cant reset it or anything. Oh, one more thing, the redstone magic ink is great, but could you make some way to be able to read it?