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
@SableDnah
I hope today evening, one of the main problems atm is the autoincrementation, (if its spelled sign xD). If this is fixed there are only a few things left.
@p000ison
Any word on a usable build? - This is awesome and is going straight on our servers once ready ;)
@VasVadum
The idea atm is very similar. But there is a problem with your sign,because we will need 2 lines for the name, because names in mc can be 16 characters lenght but one line on a sign can only hold 15.... The 2 solutions are to use 2 lines for the name or store the name if its to long in a database. The method with the 2 lines is more efficient. Also we need to store the id of the book on the sign, because 2 books can have the same title.
I'd like this to be simple as possible for me. Can you make it possible or make an alternate mod with stuff removed if necessary to make it so that all permissions are default to op only if not in the permissions files? I don't give out op abilities to anyone, so I don't really need a permission system other than to give players abilities, whereas I have all abilities. Players should only be able to read books, write their own, sign their own. If someone wants their book to be copied or sold or anything, they'd need to come to me.
I also thought of a way the signs can work. Signs are auto protected by a plugin I have, LWC. So right clicking the sign would use my economy plugin to pay whatever amount is in the 3rd line, to the name of the person in the 4th line. I just noticed that I couldn't put my books full title (1 character short) in the 2nd line. :/ First line would be like [copybook] or [book] to activate the sign as a book shop. We can have the plugin change the money value green, the player name blue, the book name red (and you have to right click the sign with the book you want to sell, after that it changes book name purple) and change the [book] text to "Buy a book!" or something like that with either black font or even another color. Here's a picture to explain in case I sucked at explaining this.
@ZeroAme
Yes thats the idea of copybooks :P Every Book is stored in a Database. mysql or sqlite.
@p000ison
was curious if you will be making it so the plugin stores the words of a written book in like a log file of sorts? Could you possibly set it up so that it stores the books in mySQL so that the original copy is not needed to be saved and we can spawn it the book on command from the saved list of books?
@nnnnjan2222
hm copy and list works now I think, create not, but thats maybe because of sqlite, which I use to test atm. But yeah I can not test much atm. Maybe takes some time, but ill give my best. But ill make here an announcement when there is a useable build. I would have finished this in a few hours if I would have a good laptop/computer now :(. :P
steal error :(
build b26 is out let me test i have fealing the creator is watching my comments
nope steal gives an internal error occurred while attempting to perform this command
oh new b24 is out let me test
version b23 steal dosent work i used writen book and used command /cb copy and nothing showed up in chat and this was in cmd window
2012-08-08 21:21:46 [SEVERE] [CopyBooks] null com.p000ison.dev.copybooks.api.InvalidBookException: The book must be a written book! at com.p000ison.dev.copybooks.api.CraftWrittenBook.<init>(CraftWrittenBo ok.java:39) at com.p000ison.dev.copybooks.api.CraftWrittenBook.<init>(CraftWrittenBo ok.java:32) at com.p000ison.dev.copybooks.Book.<init>(Book.java:37) at com.p000ison.dev.copybooks.commands.CopyBookCommand.execute(CopyBookC ommand.java:59) at com.p000ison.dev.copybooks.managers.CommandManager.executeAll(Command Manager.java:125) at com.p000ison.dev.copybooks.CopyBooks.onCommand(CopyBooks.java:138) at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:16 8) at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:4 92) at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler. java:878) at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:825)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:807) at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:44) at net.minecraft.server.NetworkManager.b(NetworkManager.java:281) at net.minecraft.server.NetServerHandler.d(NetServerHandler.java:109) at net.minecraft.server.ServerConnection.b(SourceFile:35) at net.minecraft.server.DedicatedServerConnection.b(SourceFile:30) at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:583) at net.minecraft.server.DedicatedServer.q(DedicatedServer.java:212) at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:476) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:408) at net.minecraft.server.ThreadServerApplication.run(SourceFile:539)
@nnnnjan2222
Yeah. appears to be a null Pointer exception of some sort.
when i try use command it gives me this error : an internal error occurred while attempting to perform this command
Setted jenkins and javadocs up: http://jenkins.thebigdigmc.info/job/CopyBooks/ Paste all the exception on the issue tracker. I can not test this, so can be that there are many mistakes :P
Where can i download it? I do not see any download button :o
@Arkadix11
this is also possible
@Crafter213
yep
@Armarr
maybe not sure yet
@Crafter213
I don't think if it is good idea. Your players should have an ability to get back to the rules whenever they want. I like the idea this plugin was mean from: you make sign with set syntax, and your players can get a book by clicking on this sign. Best feature for me :)
Looks great!
Will the Plugin be able to give ALL Players ONE TIME some books? Like a rule book all players get at their first join? (But they should only get it one time)?
I hope this is going to have an API because I want to make a mail plugin with books but I have no experience with SQL.