Inactive [ECON] SpoutWallet v1.5 - A display for your wallet [1.2.5-R5, 1.2.5-R4]

Discussion in 'Inactive/Unsupported Plugins' started by Spice_king, Aug 5, 2011.

  1. Offline

    Spice_king

    SpoutWallet - A display for your wallet:


    Please go to the BukkitDev page for the latest downloads and change log.

    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.
    • Shows your ranking only in iConomy5. Revoved as of V1.4.4
    • Can ignore EssentialsEco, in the event you use it for just commands.
    Requirements:
    Download SpoutWallet

    Source Code

    Sample config:
    Code:
    UpdateSpeed: 20
    yOffset: 3
    xOffset: 3
    Funds: You have %s with you.
    location: TOP_RIGHT
    color:
      rank:
        red: 255
        blue: 255
        green: 255
      funds:
        red: 255
        blue: 255
        green: 255
    
    Permissions:
    Code:
    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
    
    Screenshot:
    [​IMG]


    Todo list
    • Add BOSE and EssentialsEco support
    • Add config
    • Add a toggle for the display /wallet Suggested by @darkcloud784 here done in v1.4.0
    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
    • Lock to other corners and play nice with different screen sizes. Requested by @Pawned here Done in v1.4.0
    Changelog:

    Version 1.4.4.1
    • Fixed config saving bug that was introduced by 1.4.4
    Version 1.4.4
    • Moved to Vault from Register
    • Updates for deprecated Bukkit APIs.
    • Make safe for Bukkit 1.1-R5 ;)
    More Changelog (open)

    Version 1.4.3.1
    • Fixed warnings in log (Quick fix warning: Will mess up XX_CENTER and XX_RIGHT location options, fix for this is being worked on)
    Version 1.4.3
    • Removes Widgets on disable
    Version 1.4.2
    • Added support for iConomy 6
    Version 1.4.1
    • GPLed my code
    • Fixed yOffset for Funds text
    • Added enum catches
    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


    This plugin is now GPLv3!
    [​IMG]
     
    Taranis01, olimoli123 and Koutacles like this.
  2. @morizuki
    You must type /wallet

    @Spice_king
    I have one issue with the toggle command :confused::


    i can disable the WalletHUD (with /wallet) but when i type a second time the command, i can't enabe it.
    So i need to reboot my server to show-up again, it's pretty disturbing.

    Cordialy

    Ps: i don't use PermisssionsBukkit (i'm already with Permissions 3.1.x)

    Edit: You don't put the right version on log print:
     
  3. Offline

    Ginja

    This is a great idea for a plugin.

    How about an editable picture, such as a gold coin, or a dollar bill, whatever, with the amount next to it. The rank could be displayed on the picture. Would seem better looking with the other plugins currently adding stuff to the HUD.
     
  4. Offline

    ItsQ

  5. Offline

    Iceflamei

    SpoutWallet has worked well for me in the past, although when i recently opened the server and tried to log in, this popped up, preventing entry into the server.

    13:38:22 [SEVERE] Could not pass event CUSTOM_EVENT to SpoutWallet
    java.lang.NoSuchMethodError: org.getspout.spoutapi.gui.GenericLabel.setHexColor(
    I)Lorg/getspout/spoutapi/gui/Label;
    at me.spiceking.plugins.spoutwallet.listeners.SpoutCraftListener.drawGUI
    (SpoutCraftListener.java:44)
    at me.spiceking.plugins.spoutwallet.listeners.SpoutCraftListener.onSpout
    CraftEnable(SpoutCraftListener.java:36)
    at org.getspout.spoutapi.event.spout.SpoutListener.onCustomEvent(SpoutLi
    stener.java:40)
    at org.bukkit.plugin.java.JavaPluginLoader$88.execute(JavaPluginLoader.j
    ava:862)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:338)
    at org.getspout.spout.PlayerManager.onSpoutcraftEnable(PlayerManager.jav
    a:81)
    at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java
    :121)
    at net.minecraft.server.Packet18ArmAnimation.a(SourceFile:35)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:89)
    at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java
    :478)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:454)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    13:38:22 [INFO] iceflamei lost connection: disconnect.endOfStream

    Any help?:(

    Im using Bukkit 1060 and sputwallet 1.3.1
     
  6. Offline

    mgmmikkel

    Can you add support for Empyrium? :3
     
  7. Offline

    Spice_king

    Fixed my post to have the download pointing to 1.4.0 and and re-uploaded 1.4.0 so it says the right version in the log. That's what I get for working late and sleepily.:p
    Update to SpoutWallet to 1.4.0.
    I was thinking of that, but I wanted to get 1.4.0 out the door and get some sleep! Might take a bit but should be worth it.
    I have not seen the toggle behave the way you speak of. CB build, Spout version, SpoutCraft version and SpoutWallet version?

    Don't worry about the perms, it defaults to everyone can use and toggle.

    And fixed!
    Never heard of it. I've looked it up, but I'm not sure how I'm supposed to support it. There is no API and it does not use an economy that I can see.
     
  8. CB #1060 // Spout 1.0.5.227 // SpoutCraft 1.0.5.262 // SpoutWallet 1.4.0

    Cordialy
     
  9. Offline

    Spice_king

    That's just weird, I checked using those same builds. How many people do you get on your server? Plugins, RAM limit, RAM usage? I use LagMeter to get RAM usage.
     
  10. Offline

    darkcloud784

    the toggle only removes the display, and does not toggle it on/off.
     
  11. @Spice_king

    That this problem, i wanna (if possible) to turn on/off the HUD display :)
    sorry if it was not well explained

    Cordialy
     
  12. Offline

    darkcammo

    Ahh good work sir! Thank you! Testing now...
     
  13. Offline

    NeonJ

    Eh, I updated it but now the Y-offset or height [not sure what makes it change vertically] isn't working, it's stuck to the top!
     
  14. Offline

    Spice_king

    Sorry, could not get to a computer. Its a small typo/omission in the code that only effects the funds label while in the top left corner! I've just fixed it and will update my post and dev.bukkit.org page.
     
  15. A reload option would be nice :)
     
  16. Offline

    thedarkdima

    Add option to only show when inventory screen is open. Requested by @enenra here
    i have an idea you can bind to inventory key that when you press it, it will show the balance when you press it again it will stop.
     
  17. Offline

    Spice_king

    I know that sounds like it would work, but it would be under the inventory screen pop-up which would include the part that darkens the game. The stuff I need in Spout has not been made, last I checked.
     
  18. Offline

    LucidLethargy

    It would be great to...
    A) add an option to blink the wallet with a different color when amount in wallet is changed
    B) just put the amount and name of coin in (right now it wont let me do anything less than 8+ characters, and all I want is the "%s" in the config!

    Other than that, this is a great addition! Great work!
     
  19. Offline

    Spice_king

    A) I'll look into that, might take a bit to get nice and clean, as well as lightweight.
    B) Funny, I'll take a look at that. Might have something to do with String.format which I use to allow custom text with the balance anywhere in the string.

    Edit: Made the YAML parser catch on just having %s, put '%s' to make it not catch.
    Error might look close to this
    Show Spoiler

    [SEVERE] Could not load 'plugins\SpoutWallet-1.4.1.jar' in folder 'plugins':
    while scanning for the next token
    found character %'%' that cannot start any token
    in "<reader>", line 3, column 8:
    Funds: %s
    ^

    at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:360)
    at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:183)
    at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingValue.produce(ParserImpl.java:592)
    at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:163)
    at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148)
    at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:132)
    at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:230)
    at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:160)
    at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:122)
    at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105)
    at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:124)
    at org.yaml.snakeyaml.Yaml.load(Yaml.java:264)
    at org.bukkit.util.config.Configuration.load(Configuration.java:82)
    at org.bukkit.plugin.java.JavaPlugin.initialize(JavaPlugin.java:157)
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:175)
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:213)
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:136)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:143)
    at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:110)
    at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:51)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:133)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:337)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  20. Offline

    MuttsNuts

    Hello. Is there any way to change currency symbol as I use €'s [Euros] as my currency atm.
    Thanks very much. Cool, simple plugin. Handy tool! Cuts out a /money command :D
     
  21. Offline

    Spice_king

    Change the config in your economy to change the formatted amount, would be a stock answer from a lazy developer. Am I right to assume that you have Euro(s) as the name of currency in your econ system, but want to have it say "€" instead? If that is the case, it just a one line alteration to the code.
     
  22. Offline

    MuttsNuts

    Thank you for that. I had my economy plugin disabled at the time and didn't realise it picks up the currency name from the economy plugin. I should of checked really. My bad!
    Thanks again.
     
  23. Offline

    jmcgee611

    So does this require the spoutcraft client mod? Because I'd love to use this on my server, but I don't want to force people to use client mods. And one of my server rules is no client mods (just to prevent anything game-breaking to be used).
     
  24. Offline

    Spice_king

    It does need the client mod, if it didn't chances are that the economy authors would have built this into their economy plugins already.

    On a personal note: Not all client mods are bad (Opifine, which is included in SpoutCraft, is the only way this PC can run Minecraft), just the ones which allow people to fly and have x-ray. My advice is to change the rule to allow the use if mods that don't do game-breaking things. I also will suggest the use of a banner for the Zombe and CFB mods (I use CFBanner my self to restrict flight and cheats to trusted admins) and some anti-cheat plugins.
     
  25. Offline

    jmcgee611

    Yeah, I've been debating on changing the rule to something like that. A few of my users want to use Mo'Creatures. Is there a way to tell if people are using specific client mods? (I'm fairly new to bukkit and server hosting. I've only had mine up for maybe 6-8 months, of which it's only really been usable for half that from me learning linux/bukkit/plugins)
     
  26. Offline

    Spice_king

    Short answer: No, with exceptions.

    Long answer:

    If the mod "adds" content (blocks, mobs, etc.), it can't do squat to the server (baring a custom server that's setup to handle that mod).

    If the mod enhances the client (quick craft, auto-stack, things like that), you might catch it as some odd flurry of events that are normally user generated happening at a rate no human can cause, so as long as there is a need to tell the server (Could find out who is using a quick craft mod, but not who has is using OptiFine to improve FPS).

    Some mods are setup to check the server for data (EX. WorldEdit Client User Interface) by running a command from the client (EX. /worldedit cui) or go as far as change the way the client talks to the server (EX. Spout/SpoutCraft) by adding new packets to the server and client. These types you can see if they are used, but can't do game-breaking things on there own.

    Some mods affect the player in ways that seem off (EX. flight or x-ray), that should happen normally (EX. not touching the ground for a minute, mining tons of diamond in a short time span, finding an underground, well hidden base, then mining right down into it, etc.)
     
  27. Offline

    jmcgee611

    Well thanks for the info! This is honestly the first plugin dev I've had respond to one of my questions. So thanks for renewing my hope in these forums :D
     
    Spice_king likes this.
  28. Offline

    Spice_king

    No problem, just remember: I was not a plugin developer a month and a half a go.:p

    Oh yea, few tips for running a dedicated Linux server: Strip everything that's not needed to run the server. That means the GUI as well. Why? Wasted RAM and CPU that can be better used on the server and you might get some HD space back too.
    Install sshd and screen to the server, if you have not yet. Why? Remote terminal (bash), file transfer, and CraftBukkit's console (via screen). Useful for admining the server on the go from your laptop, net-book, tablet, mp3 player, or mobile phone. If you have an iPhone/iPod Touch/iPad, there are a number of ssh apps out there, I use iSSH, but its a matter of preference.
     
  29. Offline

    jmcgee611

    Yeah, I'm actually using a Linux VPS with 1GB RAM, screen, and I just bought iSSH though I regularly use putty on a laptop/desktop and filezilla for FTP. I'm fairly new TP Linux, but I learn quick and I'm a competent computer user. Thanks again. I'm actually thinking of picking up java as well, just for fun
     
  30. Offline

    Dthen

    Hi, very nice plugin, very simple & yet a brilliant idea.
    Are you planning to support iConomy 6 any time soon?
     
  31. Offline

    Spice_king

    I need to rework my code to use the new version of Register (the code that I use to talk to the economies), just have not had the time yet to do so. That and it looks like my pull request went missing on it's repo. Wrote the config option in Register to prefer an economy (iConomy or BOSEconomy) over another (Essentials' economy)
     

Share This Page