BookShop
Players can publish their written books in a shop, so other players can buy the written books. There are two ways of creating a BookShop:
- When the player holds a book and quill item while hitting the sign, the text in the book is copied.
- When the player places some books in the chest beneath the sign, the plugin will duplicate the item in the chest every time it is sold. Thus nobody has to write books more than once.
Please note:
- AdminShops always duplicate the book!
It works the same way than a publisher: It copies the book in the chest and sells it to the player.
Features
- Publication of written books
- backup of books into a file
- Restoring books
- Give a default book to every new player
- Give a book to every player who joined the server before.
- Give a book to a player
- Statistics for every book (how often it was sold)
- Admins can impose taxes.
- Player can only publish written books.
- Admins can create AdminShops that always duplicate the book regardless of the settings in the config file.
Dependencies
- iConomy 5 or iConomy6 or Vault or Register
- PermissionsEX or bPermissions or GroupManager or BukkitPermissions
The shop
To create a shop, you have to place an empty chest first. Then you can create a sign with following content
Please note: Only ONE book per shop is allowed!
Line | Text |
---|---|
1 | [BookShop] |
2 | |
3 | The books name (automatically added after closing the chest with the book), but you can let it empty ;) |
4 | price of the book |
OR:
Line | Text |
---|---|
1 | [BookShop] |
2 | |
3 | The books name (automatically added after closing the chest with the book), but you can let it empty ;) |
4 | price of the book:price of the book if the player has a book and quill in the hand |
To create an AdminShop:
Line | Text |
---|---|
1 | [BookShop] |
2 | AdminShop |
3 | The books name (automatically added after closing the chest with the book), but you can let it empty ;) |
4 | price of the book |
To create a Newspaper shop:
Line | Text |
---|---|
1 | [BookShop] |
2 | Newspapers |
3 | The books name (automatically added after closing the chest with the book), but you can let it empty ;) |
4 | price of the newspapers |
With the newspaper shop you are able to sell several books at a time. E.g. a book with rules and a book with a plugin info. If the player hits the sign he receives the two books.
If you don't like the keywords on the sign, you can edit them in the Shopconfig.yml´file!
At the end it should look like this:
Permission nodes
Action | Permission node |
---|---|
Create a shop | BookShop.create |
Create a shop of an other player | BookShop.create.other |
Sell books of other players | BookShop.sell.other |
Create a Adminshop | BookShop.create.admin |
Use the shop | BookShop.use |
Destroy own shop | BookShop.create |
Destroy shop of someone else or AdminShop | BookShop.create.admin |
Message to admins that someone created a shop | BookShop.admin |
Command | Permission node | Explanation |
---|---|---|
/BookShop setwelcomebook | BookShop.setwelcomebook | Sets a book which has every new player in the inventory |
/BookShop removewelcomebook | BookShop.removewelcomebook | Unsets a book which has every new player in the inventory |
/BookShop giveall | BookShop.giveall | Gives a book to every player who joined the server before |
/BookShop give | BookShop.give | Gives a book to a player |
/BookShop backupbook | BookShop.backupbook | Backups a book |
/BookShop loadbook | BookShop.loadbook | Loads a book |
/BookShop reload | BookShop.reload | Reloads the plugin |
/BookShop debugfile | BookShop.debugfile | Turn the debugfile on and off |
/BookShop internet | BookShop.internet | Turns the internet access on and off |
/BookShop version | BookShop.version | Shows the current version of BookShop |
/BookShop update | BookShop.admin | Updates the plugin to the latest vesrsion on dev.bukkit.org |
/BookShop deletedebug | BookShop.admin | Deletes the debugfile to give you free space on the hdd |
/BookShop log | BookShop.admin | Returns the current size of the debugfile |
/BookShop toggle | BookShop.admin | Turns BookShop immediately off |
/BookShop language <language> | BookShop.admin | Select the ingame language (by default english) |
/BookShop help | BookShop.help | Returns all command which the player can execute |
/BookShop showdebug | BookShop.showdebug | Shows you console messages ingame |
@TagasiCraft
Implemented in version 1.2
Cool plugin! I'd like to add this to our servers if it had one additional feature.
Could you add a configuration item that sets the base cost of a book? This would prevent someone setting the price to zero or one and being able to purchase unlimited books. These can then be traded with npcs.
Config File
----BookBaseCost: 10
This means that each time someone buys a book, they are charged $10 (it is deducted from their account). Basically its a material cost. They would then want to set the books' resale value at higher than 10 (say, 20) so they would make $10 profit / book. When making the sign, it could also check to make sure the book's cost is at least $x (config) so they dont sell their book at a loss by mistake (they could give it away free, at a cost to them).
We got some problems with dupe-items (books with zero count which can be used to dupe them within your inventory by picking up and right clicking on empty slot > signed but empty book). Then some of the bought books are empty too. Some others could not be picked up again if dropped.
The first two problems seem like a timing problem when copying the books. We already know such a problem from the magnet feature of LWC chests - this one also created dupe items some time ago which should be fixed by now. Maybe Hidendra might share some infos where to look.
Aside from that its a great plugin and actually the very only plugin which enables us to provide initial books/infos to new users at our spawn. Thanks a lot for this!
@etherz10
i had the same, problem, i mostly happands when u restart server, or somthing.
fix= get someone to have a supply of the books, and when it happands, remove the book from chest and replace the book, with one of the books in our friends supply :D
hope this helps for u :D
ah right so the sign is the datastore, ok. just a thought in terms of backup purposes thats all. nothing to worry about.
@Luficer
@fungreenfox
What version do you run? Current: 1.1
@macbookfan33
If you use Vault with EssentialsEconomy than yes, otherwise no :)
@Jarhielt
Which information? The only information is written on the sign. It doesnt use a database (why?)
how does it store the information, i see not flatfile or links to a database. idealy i would like it to use mysql to store the information.
bookshop still says update the jar file, but there isnt any newer!!
A suggestion, could the left-click be changed to right-click to buy the book? Otherwise the sign will be broken on left-click for creative mode people (if they have permission to break the sign I'd imagine). And I suppose it's in the works, but it'd be nice to be able to place the sign after there's a book in the chest. Did see you mention that you were going to have the sign do the book name, which I suppose implies support for that. And lastly, it'd be nice to have a shop that could buy books/books and quills. Only signed books if there's a way to check if the book isn't blank and just people trying to rip off the shop. Kudos so far!
"Dear Diary, this is shitt"
Its gonna be hit down at the bookstore, price = 0 :D
Will this work with the essentials economy?
@karatetoes
I believe so, but I copy the itemstack only, so I don't change the datacode.
@ArttuJarvinen
You can set the price to 0, that's implemented :)
Please add a 0 or FREE price option
Does the new book and quill use the same system as maps? What i mean is like each book and quill/map has its own datacode because with maps each map says like map_01 in the top
you have? minecraft.jar?
@etherz10
I cannot find any bugs :( Can you upload the debug.txt´(plugins/BookShop/debug.txt)? At what time has the error occured?