SpoutWallet
SpoutWallet - A display for your wallet:
Adds a line of text on screen that shows how full your wallet is. Also displays your rank. You can also toggle the display with /wallet and can use PermissionsBukkit to change who can see and who can toggle the display (P.S. Don't give toggle without use, because that's just mean!;))
This is my first "sip" of Java from the Bukkit, and it took me a bit to get it to work.
The plugin was a request from my brother who wanted to have something on his screen that shows his balance.
Features:
- Uses iConony4/5/6, BOSEconomy, EssentialsEco to find the amount of cash you are holding.
Also shows your ranking in iConomy5.Removed in v1.4.4
- Can ignore EssentialsEco, in the event you use it for just commands.
Requirements:
- Spout
- Vault
- iConomy4/5/6, BOSEconomy, or Essentials
Download SpoutWallet
Source Code
Sample config:
UpdateSpeed: 20 ignoreEssentials: false Funds: You have %s with you. xOffset: 3 yOffset: 3 location: TOP_LEFT color: rank: red: 255 blue: 255 green: 255
Permissions:
SpoutWallet.*: Users can see and toggle the display Default: All players Grants: SpoutWallet.Use: true SpoutWallet.Toggle: true SpoutWallet.Use: Users can see the display Default: All players SpoutWallet.Toggle: Users can toggle the display Default: All players
Todo list
- Nothing!
Stuff that Can't be Done Yet (Spout API change needed)
- Add option to only show when inventory screen is open. Requested by @enenra here
Old Changelog:
Version 1.4.0
Fixed on Spout 1.0.5 builds
Added Permissions (Bukkit)
Added colors
Can now use a corner other than the top left!
Toggle it!
Version 1.3.1
Added an option to ignore Essentials, in case you use it and iConomy or BOSEcon at the same time
Fixed a disable error, pointed out by @Moe041991
Version 1.3.0
Added support for EssentialsEcon and iConomy4 via Register
Version 1.2.0
Added BOSEconomy!
Version 1.1.0
Added config
Adds the ability to change the default messages
Can hide rank message
Change how fast it updates
Move the message's location on screen (up or down)
Version 1.0.1
Fixed crash with non-authed or non-SpoutCraft client
Version 1.0.0
First Version
<<reply 853210="">>
I totaly understand that. But in your preview pictures you have a 2nd line saying which rank you are. Can you tell me (us) you that worked? the %s is your money. is ther something like %rank? And some extra features (like Arko2 asked for) which can be disabled via a simpel configuration file - thats nothing special but a lot of players would like it to have but i respect your thinking about that.
A simple page (description) for advanced usage (like the 2nd line :P) would be great!
@Maxwelljones
It does exist at http://get.spout.org
Spout doesnt exist anymore :/ Will that plugin still work ?
just a suggestion, as this is a spoutcraft mod, the default position overlaps the default position of spouts minimap. it was an easy thing to fix but just a tad annoying since spout doesn't like the /reload command and you don't notice until you actually load up the client and connect.
@Spice_King
That worked perfectly! Thank you! :)
@Resettii
I have looked at that some time ago, but no good options were available to make sure it looked good not matter how the plugin was setup. If it can be done, with minimal overhead, I will look in to it again.
@MrPenguiny
That's not my error, it's a YAML (config) parse error. Colons are used to tell YAML what's a "key" and what it's "value" is. Try quoting it like this instead in the config:
That should make it work, but come back and tell me if it does not as I can't check anything at this moment.
Is there a reason why the message as in, "You have %s in your wallet." Cannot have Colons, aka :
I wanted to make the message:
Money: %s
But I get an error report saying colons are not allowed. :(
@Spice_King
Great plugin! Is there a way to add a customizable icon on screen(i.e diamond, or something else) next to the amount of money?
@Spidiweb7
I have a feeling I know why that error happens, I'll look into it when I can get to my PC.
Not to worry it isnt urgent. Only error i seem to be getting at the moment is this one http://pastebin.com/qymdf1J5
@Spidiweb7
SpoutWallet should be 1.3 ready, but I'm bottlenecked by SpoutPlugin and SpoutCraft, as they are still only for 1.2.5. It might take sometime for them to get updated to 1.3. You may have luck with dev versions, but if anything funny happens with the dev builds, I might not be able to help much.
Any word on an update to 1.3 ?
good job! simple, workable, effective!
@Arko2
Sorry Arko2, I'm a fan of the "do one thing and do it well" idea. There will not be the ability to to put things other than your economy balance on your screen in this plugin. I'm not saying that it can't be done, just wont be done in this plugin.
As a side note: I was asked to do a plugin for giving mcMMO Spout based features, but turned it down. I heard that nossr50, author of mcMMO, was going to just roll Spout stuff into the plugin. It's done better than what I think could have been done with an external plugin.
i am sorry my english is very special because i am german and never learned it at shool ;D i want that it display my money,healt and other things like region and mana(Heroes)
if this is possible u could add a wiki or a config for me with the things above ?
i hope u understand what i mean ;)
arko's comment is something along the lines of can you make it display your health and the region through worldguard or another region plugin. and if it is not in the config, maybe he wants it in there.
New version inbound!
@russjr08
I'm so sorry! I've missed your comment for so long! Please make sure that both the server and your client are running the latest version of SpoutPlugin and SpoutCraft.
@Arko2
Huh?? I had to ask a few people to try and help decipher your comment, we failed to find any meaning behind it.
Hi dude i try to add Hp money and the region....okey the money is basic but how do i setup the others?
I get the message saying I'm not using SpoutCraft when I am. : I have both the server plugin and the client installed. I noticed Keybindings wasn't working with Backpack, but using SpoutTrade I can right click people for trade, so I don't know whats wrong..
@Underbalanced
I'll post some of my findings, for _65_ runs of per player updates (one player updated 65 times or 13 players updated 5 times). This test was run with one player on SpoutCraft (me) on a local server, every thing was left as is, config wise. Has BOSE, Vault, Spout, and SpoutWallet. BOSE was left as flat file with one user in it.
This is my main task for doing the updates: com.github.spice-king.bukkit.spoutwallet.SpoutWallet.updateGUI(org.bukkit.entity.Player) 65 runs, self time: 5.7 ms, extrapolated to 6k server ticks at 20 ticks between updates: 26.3076923077 ms (5.7 ms ÷ 65 runs × (6000 server ticks ÷ 20 ticks between runs (updatespeed=20)))
The heaviest Vault/BOSE part I could find (Turns a number into a string, ex 52.20 to 52.20 Minebucks): net.melkbones.vault.economy.plugins.Economy_BOSE7.format(double) 65 runs, self time: 17 ms, extrapolated to 6k server: 78.4615384615 ms (17 ÷ 65 × (6000 ÷ 20))
The biggest thing from Spout that I caused (updating the text on screen): org.getspout.spoutapi.gui.GenericLabel.setText(string) 65 runs, self time: 0.350 ms, , extrapolated to 6k server ticks: why bother?
Now, I'm sure I can find a way to cut down that 5.7 ms to a lower number, but most of the clocked time belongs to other people's code.