XPConomy
XPConomy is a plugin that allows players to send other players levels of experience.
Commands:
Aliases: /xp,/exp,/experience,/xpconomy
/xp give command increases the <player's> xp amount
Usage: /xp give <Player> <amount>
Example: /xp give Notch 80
/xp send command increases the target's xp while decreasing the senders
Usage: /xp send <Player> <amount>
Example: /xp send Notch 20
Permissions Nodes:
xpconomy.* - Gives permission to all xpconomy commands
xpconomy.xp.give - Gives permission for the /xp give command
xpconomy.xp.send - Gives permission for the /xp send command
Changelog:
v1.0
- Basic exp trading, plugin Released
v1.1
- Added Permissions
- Changed /xp give <name> <amount> to /xp send <name> <amount>
- Re-purposed /xp give to have it give <player> the amount of xp without depleting the sender's xp. This command is console compatible
- Fixed a problem where a person could send a negative amount of xp, thus depleting the the other person's xp
- Added several command aliases (xp,exp,experience,xpconomy)
- Fixed a couple of errors
v1.1.1
- Fixed a problem where giving a player a negative amount of xp greater than their total, would set them in debt
- Fixed two more errors
v1.1.2
- Fixed error messages sometimes not showing up
- Corrected default permissions
Downloads:
DropBox Download:
http://dl.dropbox.com/u/33386148/XPConomy/XPConomy%20v1.1.2.jar
NOTE: Source code comes with the download
Known Problems:
A bug where people can farm exp by collaborating with another player:
Darkenvy said:
"Realize this: it takes 2 exp orbs to get to lvl one. however it takes around 20 to get from 49 to 50. you can have someone simply gain lvl 1 over and over and send the exp to someone else. This would only take 100 orbs to get to lvl 50 vs the several hundred required to get to lvl 50"
Thanks to Darkenvy for pointing this out. Please don't tell this to your players =P, I am working on this.
Hi, can you fix the /xp set command?
I was trying to use it doing /exp set player 5
and /xp set player 5
But it doesn't work each time
So when is the next update?
This is perfectly simple and wonderful, thank you for maintaining it! I just wanted something that was simple to use for players to use however they want. :D
@deleted_7536780
The cause for that appears to be caused by the fact that you entered a fraction. Currently only whole levels of experience are permitted to be sent due to the way the plugin handles sending exp, this should be able to be fixed as soon as I fix the way exp is sent. Thank your for reporting here.
org.bukkit.command.CommandException: Unhandled exception executing command 'xp' in plugin XPConomy v1.1
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42)
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:166)
at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:479)
at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:821)
at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:781)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:764)
at net.minecraft.serverhook.NetServerHandlerProxy.a(NetServerHandlerProxy.java:141)
at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:34)
at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:113)
at net.minecraft.serverhook.NetServerHandlerProxy.a(NetServerHandlerProxy.java:83)
at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:551)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:449)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
Caused by: java.lang.NumberFormatException: For input string: "0.1"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at me.snakecharmer3.xpconomy.XPConomy.Send(XPConomy.java:120)
at me.snakecharmer3.xpconomy.XPConomy.onCommand(XPConomy.java:43)
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
... 14 more
I have done something like this three month ago. With xpShop you can store xp, trade and send xp to offline player. You can create xp shops, change money into xp and something more. Please test xpShop. http://dev.bukkit.org/server-mods/xpShop
@Randude14 Actually there already is one there
One suggestion to your source, I would add an if-statement checking if the receiver is not null (online) like so:
if the receiver is null it will throw a NullPointerException ;) hope this helps