XPKeeper
XPKeeper lets you save and retrieve your current XP level by clicking on a sign.
Yes, I know there are quite a few XP bank type plugins out there, but I wanted one without any other plugin dependencies, and one that was simple to use without any economy features - I just want to save my XP, so I don't lose it - no need for anything else.
Quote from eccentric_nz:Still alive! Get builds here: http://tardisjenkins.duckdns.org:8080/job/XPKeeper/
How does it work?
XPKeeper is sign based, you place a sign post or wall sign and put [XPKeeper] on the first line. The text between the square brackets can be changed by editing the config file and is case-insensitive.
- To save your XP (both LEVEL and EXPERIENCE), LEFT-click the sign with nothing (AIR) in your hand. Your XP will be transferred to the sign and will disappear from the HUD.
- If you gain more experience, just LEFT-click the sign again to add the current amount to the existing saved XP.
- To withdraw some XP, RIGHT-click the sign with nothing (AIR) in your hand. The amount you withdraw is set in the config file (5 levels by default). To withdraw all your XP, RIGHT-click the sign while SNEAKING.
NOTE You can configure the plugin so that you don't have to click with your fist, but it saves mistakenly placing a block :)
Videos
Removing an XPKeeper sign
XPKeeper signs cannot be removed by breaking them. You must use a command instead. Type:
/xpkremove
And then click on the sign you want to remove. You must have nothing (AIR) in your hand.
You can only remove your own signs.
Other features
- You may have one XPKeeper sign per server world
- XPKeeper signs are protected from explosions and griefing
Configuration
There are some configuration options:
firstline: XPKeeper
This determines what must be inside the square brackets on the first line of the sign, you could change this to 'Bank' for instance.
must_use_fist: [true|false]
This determines whether you must use your fist to click the sign.
set_limits: [true|false]
This determines whether the deposit limit feature is enabled.
limits: - 30 - 50 - 100
If set_limits
is true, set the limits used by the xpkeeper.limit.[amount]
permission nodes here.
withdraw: [amount]
Set the amount of XP levels you will withdraw when you right-click the sign. Set to 0
to use the old behaviour of withdrawing all your XP.
messages: deposit: You deposited %d XP and have reached level %d :) withdraw_all: You withdrew all your XP! withdraw_some: You withdrew %d XP Levels! [...]
Use this to localise the player messages in game. Some message strings contain the symbols %s
and %d
these must not be removed as they are replaced in game with values calculated in real time. You can move them to any position that makes sense with the message.
A French translation courtesy of DragonSlayer875 can be found here
Permissions
There are some:
xpkeeper.use
- allow players to make XPKeeper signs, default: TRUE
xpkeeper.fist
- allow players to use the /xpkfist
command, default: OP
xpkeeper.pay
- allow players to use the /xpkpay
command, default: OP
xpkeeper.force
- allow players to use the /xpkforceremove
command, default: OP
xpkeeper.admin
- allow players to use the /xpkgive
, /xpkset
and /xpkwithdraw
commands, default: OP
xpkeeper.editsign
- allow players to edit signs, default: OP
xpkeeper.limit
- allow players to use the /xpklimit
command, default: OP
xpkeeper.limit.[amount]
- limit the amount of level a player a player can deposit up to, [amount]
must match one of the limit
options in the config
xpkeeper.limit.bypass
- allow players to by pass deposit limits, default: OP
Commands
There are seven:
Command | Description | Alias | Permission |
---|---|---|---|
/xpkremove |
Use to remove your XPKeeper sign, see Removing an XPKeeper sign above |
/xpkr |
- |
/xpkfist |
Toggle the must_use_fist config optionbetween true and false or vice versa |
/xpkf |
xpkeeper.fist |
/xpklimit |
Toggle the set_limits config optionbetween true and false or vice versa |
/xpkl |
xpkeeper.limit |
/xpkwithdraw [amount] |
Set the withdraw config optionto the amount of levels specified |
/xpkw |
xpkeeper.admin |
/xpkreload |
Reload changes to the config | /xpkrl |
xpkeeper.admin |
/xpkgive [player] [amount] |
Add XP to a player | /xpkg |
xpkeeper.admin |
/xpkset [player] [amount] |
Set a player's total XP amount | /xpks |
xpkeeper.admin |
/xpkpay [player] [amount] |
Pay a player some XP | /xpkp |
xpkeeper.use |
/xpkforceremove [player] |
Use to remove all XPKeeper data for the specified player from the database. When using the command from the console, you must specify a player name, otherwise it runs using the player that types the command. USE WITH CARE! |
/xpkfr |
xpkeeper.force |
To do
- Link signs between worlds?
- Add config option to limit signs per player
Stats
Basic statistics are collected by this plugin using MCStats / Plugin Metrics , such as:
- Java Version
- Operating System
- System Arch
- Global Statistics - player and server counts
- Server Locations
- Game Version the game version - or Minecraft Version - servers are on
- Server Software - the server software - such as CraftBukkit - servers are running
You can opt out at any time by setting opt-out: true
in plugins/PluginMetrics/config.yml
Change log
Get new builds here: http://tardisjenkins.duckdns.org:8080/job/XPKeeper/
v1.4
- Requires CraftBukkit 1.7.5 or higher
- [In preparation for Minecraft/CraftBukkit 1.7.6/7/8] we have switched to using player UUIDs instead of names when storing and retrieving XP
- The plugin will automatically backup and update the XPKeeper database
- When the updating takes place the plugin will connect to api.mojang.com to lookup player UUIDs - this make take some time if you have a large number of users
- The server must be in online mode!
v1.3.10
- Fixed a bug with setting XP limits and PermissionsEx
v1.3.9
- Added the ability to colour the first line of the sign - set
firstline_colour
to a colour code (&2, &c etc) in the config, or use the commandxpkc [colour code]
Note colour will only apply to newly created signs.
v1.3.8
- Fixed startup errors with CraftBukkit 1.7.2-R0.3 #2978 and higher
v1.3.7
- Fixed a String format error when using the
/xpkpay
command
v1.3.6
- Signs (and the blocks they may be attached to) can no longer be destroyed by pistons
v1.3.5
- Added
/xpkreload
command to reload changes made to the config file
v1.3.4
- Fixed
firstline
config option not being set when the plugin is run for the first time - Added configurable deposit limits
- Enable the feature with
set_limits: true
- command is/xpklimit
to toggle true|false - Set a range of maximum level limits in the config, then give players/ranks the permission
xpkeeper.limit.[one of the configured amounts]
- Bypass the limit setting (if enabled) with the permission:
xpkeeper.limit.bypass
(default OP) - If a player's currently held XP would boost the XPKeeper XP over the limit, then the plugin deposits as much as it can (up to the level limit) and leaves the rest with the player
- Enable the feature with
v1.3.3
- Added configurable strings to the config so you can change the language used to message players
v1.3.2
- Fixed a problem with player names that don't fit on a sign (> 15 characters)
v1.3.1
- Changed all SQL to use prepared statements so that world names can have apostrophes in them
v1.3
- Added configurable withdrawal amount.
- Set the amount (in levels) in the config with
withdraw: [amount]
- To keep the old behaviour of withdrawing all your XP, set
withdraw: 0
- To withdraw all your XP regardless of the
withdraw
amount, right-click the XPKeeper sign while sneaking
- Set the amount (in levels) in the config with
- Added command
/xpkwithdraw [amount]
to set the withdrawal amount in the config. - Added some feedback messages.
- Fixed - when removing an XPKeeper sign with
/xpkremove
you now get all your XP back and the sign drops naturally. - Fixed - only the player whose name is on the sign can interact with it.
- Updated to Bukkit 1.4.6-R0.4-SNAPSHOT
v1.2.3
- Added
/xpkpay [player] [amount]
to pay a player some XP
v1.2.2
- Added command
/xpkgive [player] [amount]
to add XP to a player - Added command
/xpkset [player] [amount]
to set a player's total XP amount
v1.2.1
- Added permission
xpkeeper.force
for the command/xpkforceremove
v1.2
- Built with Bukkit 1.4.5-R0.3-SNAPSHOT
- Added command
/xpkforceremove
to delete all player data from the database USE WITH CARE When using the command from the console, you must specify a player name, otherwise it runs using the player that types the command. - Added plugin metrics
- Correctly nested permissions, so that the plugin is not clearing the first line of signs
v1.0.2
- Built with Bukkit 1.4.5-R0.1-SNAPSHOT
- When making an XPKeeper sign, the first line is case-insensitive so
[XpKeEpeR]
and[xpkeeper]
are now both valid - Improved sign grief prevention
- Added config option so that you can use anything to click the sign (bit of a pain when you right-click the sign with a placeable block, but at least you now have the option) - set
must_use_fist
tofalse
to click with anything - Added permission
xpkeeper.use
The default is OP. You must have this permission in order to create an XPKeeper sign
v1.1
Includes all the v1.0.2 changes as well as:
- Changed the formula for storing and retrieving XP, the sign now respects the fact that higher levels require more XP
- Added command
/xpkfist
to toggle the config optionmust_use_fist
true or false - Added permission
xpkeeper.fist
The default is OP. You must have this permission to use the/xpkfist
command
What it looks like
aww great, lol.... ok i'll take a look at it tomorrow. thanks for the heads up.
@marubal21
The problem is with your world name - the database that records your XP is freaking out because you have an apostrophe (') in the world name. I will see if I can alter the code that inserts and retrieves the XP data so that it can handle apostrophes... until then, you could maybe change the world name
@eccentricnz
yes v1.3 my player name is Penturt and the world name is Bobby's Funhouse.
@marubal21
Can you tell me:
@marubal21
Version 1.3?
I was testing out the plugin, on CB 1.4.6 build-2593, i would be able to make the sign, and then i would add my XP to the sign, i see my XP get removed from the HUD and added to the sign. but when i go to remove it the level changes to 0 and the XP to -1 and none of it comes back to me. when i checked the log the following is all i see when i tried to get my exp back.
2013-01-14 22:35:06 [SEVERE] [XPKeeper] Could not GET XP: java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (near "s": syntax error) 2013-01-14 22:35:06 [SEVERE] [XPKeeper] Could not add new database record: java.sql.SQLException: near "s": syntax error 2013-01-14 22:35:21 [SEVERE] [XPKeeper] Could not GET XP: java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (near "s": syntax error) 2013-01-14 22:35:21 [SEVERE] [XPKeeper] Could not add new database record: java.sql.SQLException: near "s": syntax error 2013-01-14 22:35:35 [SEVERE] [XPKeeper] Could not GET XP: java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (near "s": syntax error) 2013-01-14 22:35:35 [SEVERE] [XPKeeper] Could not SET XP: java.sql.SQLException: near "s": syntax error 2013-01-14 22:35:40 [SEVERE] [XPKeeper] Could not GET XP: java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (near "s": syntax error) 2013-01-14 22:35:40 [SEVERE] [XPKeeper] Could not SET XP: java.sql.SQLException: near "s": syntax error 2013-01-14 22:35:42 [SEVERE] [XPKeeper] Could not GET XP: java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (near "s": syntax error) 2013-01-14 22:35:42 [SEVERE] [XPKeeper] Could not SET XP: java.sql.SQLException: near "s": syntax error
@eccentricnz
@Tisdan
Updated, file waiting approval
Check the Changelog for details!
BUG: When you as owner destroy a sign, you loose all your exp Edit: Destroying a sign won't give you a sign back
@melikoth
Quite heavily into my TARDIS plugin at the moment, but will put this on my todo list!
Hi eccentricnz. Digging your plugin, thanks!
I was wondering if you could add configurable withdrawal amounts in the config.yml.
For example, the config would have the line: withdraw: 5 The result being the next 5 levels worth of exp is withdrawn from the sign when the user right clicks their sign.
Thank you.
@thazro
Version 1.2.3 now includes an
/xpkpay [player] [amount]
command :)http://dev.bukkit.org/media/files/657/592/XPKeeper.jar
Hi, could you add /xpkpay command, that would substract xp from the current player and add to another? Thank you.
I have been looking for something simple like this for ages!
whole player records. When I want to edit their XP im usually giving yhem with commands. But if you feel like it you can do both of them giving different commands. You should also start making shortcuts like /xpkrem cuz they start to get really long imo.
@Folas1337
Yes you should be able to specify a player name in game. I will release an updated version tonight that includes a permissions node to go with the command as it is potentially a bit dangerous at the moment (blame late night coding...)
When you run the
/xpkreload
command, should it update the XP amounts on all the XPKeeper signs or is that not what you are editing in the database, is the data you are removing just whole player records?So can I as an admin do "/xpkforceremove USERNAME" to delete someone else's data or is it just for myself and I can only remove other's data by doing it with the console?
One last suggestion: "/xpkreload" to reload the database. If I remove some data by hand and put the new .db in it should load it without a restart.
@Folas1337
Will add the force remove command as soon as I have time
Got a really big problem here:
I've put in a backup of a world which does not include the [XPKeeper] signs of all users but they're still registered. Now how do I get people to remove their XPKeeper when the sign's not there anymore?
They can not create one because it says "You already have one" and they can not remove it because they don't have a sign to click.
Any way that you could add something like /xpkforceremove or something? I really need to get rid of the XPKeeper database part I don't need anymore.
@eccentricnz
Alright, so what your saying is that the level cap is not 30 itself that just is what the enchantment table goes up to that makes sense, thank you very much.
@xBloodydaggerx
It would give you the whole lot, my understanding is that the 30 level cap is the maximum enchantment available in the bottom slot of the enchantment table