CopyBooks
CopyBooks - Copy written books
CopyBooks was made out of a plugin request. It supports/will support saving books for later restroring, replacing text in a book, copy only pages into another book, unsigning books, unlimited access for a specific book from signs, selling/buying books, getting books based on the permissions group when you spawn. All is already done except the buying selling, copy pages and replacing. But it will be no big deal. This plugin is in pre-alpha and not tested. The source is available on github so feel free to push pull requests. At the moment I have to hook the net.minecraft code directly, because the api is not yet implementd in bukkit. This means it only runns on CraftBukkit.
Features:
- Save books
- Restore books
- Getting books when a player spawns
- Getting books through signs
- Setting up commands for books
- Selling/buying books
Upcoming features:
- Format pages like center
- Replace text in books
- Copy only specific pages
- Convert text files to books (maybe even word documents :P)
- Dispense books from dispensers :P
Installation
You have to compile it at the moment yourself because its in pre-alpha. But it's easy if you have some basic knowenledge about git and maven. First clone the repo with git clone [path] and do then mvn clean install. This depends on a working git and maven installation.
Configuration
It is almost self explaining. The 2 settings you can do atm in the config is the group based book spawn when a player joins and the command based books. A better explanation will follow here :P
Commands
- /cb copy- Copies the book you are holding
- /cb create [id] - Creates a book from an id
- /cb list - Lists all copied books
- /cb unsign - Unsigns a book
Sign-Syntax
Unlimited book sign:
[CopyBooks]
id
Sell/Buy sign:
[Seller]
[Seller if the name is longer than 15]
Id:Amount
Price
Example:
p000ison
[A super cool story]
3:1
6.3
Additional info
To-Do
Setup jenkins- Fixing bugs for daus
- Fixing small bugs
- Add upcoming features
If you would like any help with this I can help.
Nice. I am still waiting for a stable release with dispensers in it. WHen thats out it goes right to my server :) Its great for tutorials and stories
k Ill split it now into 2 lines. Caching works great too. You can set a maximum cache size and you can clear it. k now only signs need a bit work and the dispensers. But yeah looks good. Also I want to document all. :P
Added book download command, implemented first try of caching, speed improvements
3 votes are missing c'mon :P
@In5aN1aC
Yeah already done :P
@p000ison
Nah. don't need random. Would like options for only on first login, and also for every spawn as an option.
k lets add now multiple books ;P
I think random books are unneccassary or?
@SableDnah
Ive made it before in an other plugin, but im not sure. Tried now a different method. Not sure if it works. I tried player.hasPlayedBefore onPlayerJoin. if this does not work ill do player.getFirstPlayed() - 10sec :P
@p000ison
New is perfect - How you detecting/tracking 'new'?
@Underbalanced
There is a button in the upper right corner after you registered :P
k Ill add multiple books. Checking if the player has this book already is not really possible because 2 books can have the same title. But Ive made it so that only new players get this.
Good Concept,
Tickets are way confusing i cannot even figure out how to submit one!
Multiple Books on Player Spawn/Login Check to see if book already exist, if so do not add another
Vote! GoGoGo!! Want to finish this part today evening! :P
@SableDnah
:P the title will be shorter if its too long. The last character matters here, because it should also work with offline players :/. Im not sure about this. Why can't a single line on a sign hold 16 characters?! Its a mess :P. I put now a poll to decide this. After 5 votes Ill choose one way. Thats one of the most crappy thing atm: The selling signs, because im not sure about the layout xD
@p000ison
Was just wondering why you needed the title on the Sign ;) If its purely a decorative function then does the last character matter?
@SableDnah
I only need the id. The title is unneccassary. Books can have the same title and I store the books in the database by id.
@p000ison
Why do you need title AND ID? Is the title not stored in the data block with the rest of the book?
@VasVadum
Not sure what you mean, but we need to store a 16 lenght name, a book id and a price. Optional an amount. We need 2 lines for the name, because a name can be 16 long but one line on a sign can only hold 15.
@p000ison
What if the name of the book on the sign is just something manual. Which doesn't effect the sign.
[book]
meaningless
15.00
vasvadum
meaningless would be anything you type. So you'd have to right click the book on the sign or whatever to get the sign to realize what book it's selling.
@MonarchyPlugin
So storing unlimited books in a dispenser? k this is added to the upcoming features list :P
btw this build works ok: http://jenkins.thebigdigmc.info/job/CopyBooks/32/
But if you want a really useable build wait :P
Hi, This idea is completely awesome. I thought of it and was looking for a plugin todo this. I am server owner at UrbanCraftPVP. We would like to print books in the following way:
+Dispenser (owner can store a written book inside) +Button
Anyone who presses the butten gets a copy of the book that is inside the dispenser. Thats it.