MagicBookshelf by Tim Clancy - 1.2.5 Compatible
Magical Bookshelves!
Release of Source Code:
As of 2.11.14, Tim has released all code free for use here: https://github.com/TimTinkers/MagicBookshelf. The code you will find there is the plugin in its most current state. Enjoy, and feel free to reproduce in any manner you'd like, just so long as credit is always given for any code used. It would also be very kind of you to link to this page as well.
Goal:
This plugin seeks to improve upon the vanilla Minecraft enchanting system.
The Minecraft system takes a very long time to get to higher levels of experience, and resets you to a much lower level upon dying. This encourages many players to make mob grinders to try and earn experience, which is not fun for anyone. The way MagicBookshelf tries to fix this is by allowing players to quickly and simply store their experience points inside of bookshelves, to be withdrawn later. By allowing users to slowly build up their levels over time, it is possible to get to that 30th level without sitting at a mob grinder all day.
Features:
Right-click a bookshelf to store your experience inside it.
Left-click a bookshelf to take the experience out of it.
Add a sign with [XP_Private] on the first line, followed by up to three usernames, to lock a bookshelf for certain users. Only these users will be able to break, withdraw from, or deposit to that bookshelf.
Permissions supported:
- magicbookshelf.lock gives users the ability to lock their shelves.
- magicbookshelf.break gives users the ability to break ANY shelves.
- magicbookshelf.store gives users the ability to store xp in shelves.
- magicbookshelf.withdraw gives users the ability to withdraw xp from shelves.
It's that easy! Video of use:
If you are Polish, adeknijak made this neat video:
If you are Czech, LPmareonCZ made this neat video:
Configuration:
There isn't any way to configure settings right now. Just be certain that the MagicBookshelf folder (and its included shelves.txt file within) make it into the plugin folder. There are both Java 7 and Java 6 versions, choose Java 6 if you aren't sure.
To do
- Add configurable settings.
- Add permissions support.
- Add an effect to bookshelves that have experience in them.
@iamthefish
Are you sure you're using v0.6? This sounds like a bug I thought I just fixed.
@Pierpy89
Thank you for the post, I'll look into this as soon as I can.
Hi Derth,
I put a sign on the front of the bookshelf with the words "[XP_Private]" and the name of player, but all the players anyway can store and withdraw the exp from that bookshelf. It's my fault or a bug of plugin?
Screen of Bookshelf => http://i40.tinypic.com/2lb094.png
Thanks for your work!
I had a similar issue today as NinjaPylon when using it for the first time.
I had been putting/removing xp without issues for maybe half an hour and then it started saying there was nothing in the shelf when there was (there was!). After waiting a while and it telling me there was nothing in it I finally got 3 levels out of it. Lost about 12 levels and removed the plugin.
I love the concept though and will try again on your next update. I'm running bukkit 1.2.4 dev build whatever that is so that might be a factor.
@NinjaPylon
There's nothing I can really think of...
Are you using v0.6?
@lizardbones
Good to hear it's working. And yes, the one or two experience lost is due to rounding errors, of which I can't do much. But like you said, it's only one or two points each time so it doesn't matter if you store any significant amount of experience.
@grimmy347
Permissions support will be coming shortly, and that should fix the problem.
Hi, we're running a 1.2.4. server. We installed MB but it seems some users can only deposit xp with or with a private sign. once stored he bookshelf claims no xp is stored there. Is there a fix you can think of off the top of your head? or a possible conflict?
thanks
Tested with CraftBukkit R0.2 #2100 and it works. I put experience in and I can take experience out. It seems to take 1 experience point every time I store the experience in there. I'm not sure if this is intentional (i.e. the cost of storing your xp in a bookshelf) or if it's a side effect. It's not a big deal since it's only 1 xp, but it should be noted that it happens.
I haven't fully tested the locking mechanism yet though.
edit The one xp loss seems to occur when I save XP, not when I take it out. So my XP is set to 0, but my XP is stored in the bookshelf minus 1.
I can deposit xp just fine on my server, but i cannot withdraw it. i've tried with, and without a sign on it.
Any ideas on a fix?
(I own the server)
Also, if you get attacked while placing sign, it locks anyone from being able to use/remove that block. world edit can fix though but still annoying.
man, i love this but you got to get it some permissions support! =P
Version 0.6 is up. It is compatible with 1.2.4 builds.
This version fixes the bug that simply ate all of the experience you tried to store inside of shelves, and adds some indication for a user when a bookshelf is locked properly.
@ttamttam
I just uploaded v0.6 to fix a bug now, configuration and permissions support will be included in the next update.
Hi this looks like a great plugin, however i don't like that you can store massive amounts of exp in just one bookshelf. Could you add a config to allow a max amount of exp per bookshelf?
@SViking
Read my response. I don't see much else I can do and it's a pretty minor problem.
Coolio. I don't have many users to manage, so returning their xp isn't a big deal. Thanks for writing the mod in the first place and keeping an eye on your creation. :-)
Just posted ticket 'Cumulative XP loss.'
@lizardbones
This is a bug that I accidentally introduced with v0.5. I tried to work on it tonight but I don't know why it's happening. :( Tomorrow I'll take another look at it and try my hardest to squash the bug. Sorry.
Since the update to 1.2.4 - you can put experience into the bookcases, but you can't get your experience out...it disappears. Kind of like those old roach motels, except it's your experience that never leaves.
There are no errors in the console, so I only have the user side effects to post.
edit Actually, if I look at the shelves.txt file, the locations stored for the bookshelves are not the locations of the actual bookshelves. It looks like they are off by one. It's definitely not storing the world that the user is storing their XP in.
So, I would request Multi-world support and an update to the 1.2.4 version of Minecraft/Bukkit.