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 |
@DrinQ
Answer to your first question: Thanks for the screen shot, so I get your point. I will implement this feature in an upcoming update.
Answer to your second question: I removed that feature because I removed all Craftbukkit methods, so I had to change the storage system of the books. If I have enough time to reimplement this feature, it will be back soon.
Ok, I have another question:
Why did you remove the "selled" statistic from when you sneak click the sign?
(Also; it should be "sold")
@ibhh
It would be possible to fit in twice the amount of bookshops in the same space, since you could then alternate between trapped and regular chests.
Like this: https://www.dropbox.com/s/suhcn4fv6uu1zvr/bookshop.png
@DrinQ
Why should I do? What's special about trapped chests?
Are you working on making this work for trapped chests as well?
<<reply 1425915>>
The list that show what permission every action need it says
Create a shop - BookShop.create
Destroy own shop - BookShop.create
Create a Adminshop - BookShop.create.admin
Destroy shop of someone else or AdminShop - BookShop.create.admin
I just wondered if Create/destroy has the same permissions cause according to the list they do (Create/destroy shop has both bookshop.create and create/destroy admin shop both has bookshop.create.admin
Is that the correct permissions? Just wondering cause it felt like you could just write it together as 'create/destroy' and save a line each and people like me wouldn't be asking if there's a typo or correct. :)
@ibhh
thanks a lot : D,It's very sorry,because my englsih is very pool,let you feel plagued is my wrong : (
@ursak
What do you mean exactly. I didn't get the point.
@Arthurdes
Don't understand you because of your English. But you might made a mistake, so delete the row in the configuration and use the setwelcomebook command please.
Perm: BookShop.create is for both creating and destroying your own shop or did you just make an error there?
If all you need is "BookShop.create" then perhaps you'd put a Create/remove owned shop on one line instead?
here have a quaestion Problem,i'm not understand when a new player into server to give him book, GiveBookToNewPlayers: true Book: User - The example rules.txt tax: 0
the rules.txt is create into where? then it is how to white in the book
@deleted_9225422
@deleted_9225422
@tarahere81
Added support for too long usernames in version 5.1
where's the command /book buy? I requested it like a year ago. :)
@omgitsmit
Issue accepted. Fixing it on the next update.
Even though i run /bookshop setwelcomebook while holding our rulebook, and i see it update with the user and books name in the config.yml. I still get the following when new players join:
[INFO] newplayer logged in with entity id 46360 at ([world] -5.5, 216.0, 7.5) [SEVERE] [BookShop] WARNING: Book wasnt found, so the new player gets no book! [SEVERE] [BookShop] WARNING: Please check your config.yml or type with a book in the hand '/bookshop setwelcomebook'!
@Ebins
No problem.
I'm an idiot. Yes, I was using trapped chests. I didn't even know they worked. Sorry!
@ibhh Not sure what you're talking about when it comes to trapped chests, but I just grab a regular one from creative, and place it against a block. Then i place the sign above and that's it. Would lockette/chestshop cause issues?
@Ebins
You use a chest or a trapped chest? It works for me with a chest :)
Um, I'm having some problems. It won't let me create a book shop/dispenser. I have a sign over an empty chest (also tried with a book in it), and the following is what I write on the sign:
[BookShop]<br> AdminShop<br> <br> 0
I left the third line blank as I guess the plugin is supposed to fill it in?
Anyway, I keep getting an error message stating that the shop needs an empty chest under the sign. I'm really confused :(