Inactive [ECON] hBank 1.53 - Banks, now with 100% more Bukkit permissions [1060]

Discussion in 'Inactive/Unsupported Plugins' started by hatstand, Jul 27, 2011.

  1. Offline


    hBank - Banks, now with 100% more register.

    Version: 1.53 (Permissionerer)

    Yes, iConomy 5 already has banks. But they're severely lacking in features. This is my first foray into a serious-ish plugin, and Java as a whole. This was written for my server originally, but I've made a few revisions to make it workable as a public plugin, and done alot more work on it than I thought I would be.

    How it works:
    You create a set of banks, users join the banks for a fee, and every 24 real hours (give or take a few minutes if your server restarts), they get interest. All of the fees get paid into the Bank Owner's account.

    Accounts are stored in the economy as <bank id>-<player name>. For example, my account with the Atlas Corp. Bank on my server (ID atlas) is stored as atlas-hatstand.

    • Any one of iConomy 4, 5, & 6+, BOSEconomy 6 & 7, Essentials Economy 2.2.17+ or MultiCurrency
    • WorldGuard 5 - Can be used to control bank access areas
    • Permissions (3.x) - Can be used for fine-grained feature access if you don't want to use bukkit's permissions.
    • Fully customisable banks, with player owners, interest rates & fees.
    • Private banks, which are invite-only
    • A dodgy admin command for in-game modifications
    1.3 Additions:
    • Bank Access Permissions:
      • Enabled via perbankpermissions in config.yml
      • This switch will only work if you've already enabled permissions, and will allow you to specify which users/groups can access which banks via a permission node in this format: hbank.banks.<bank id>
    • Custom Interest Interval
      • Changed via interestperiod in config.yml
      • The number here controls how often interest is calculated, in hours.
    1.1 Additions:
    • WorldGuard Regions:
      • Enabled via useworldguard in config.yml
      • In config.yml, you'll find an array called regions for each bank. The regions placed in here are where users can access that specific bank, eg: regions: [region1, regionaaa] Would allow members of that bank to access their bank in the regions region1 and regionaaa. Note that this only restricts join, leave, withdraw, deposit, balance, and info
    • Permissions:
      • Supports Permissions 3.x and Bukkit Permissions
      • Enabled via usepermissions in config.yml
      • There are permissions for each sub-command in /hbank, and one for bank access at all.
        • hBank.commands.use - User/Group can access /hbank
        • hBank.commands.<sub-command> - User/Group can access the sub command specified - See the command reference for the names to use
    • Download and install an economy framework - Any of iConomy 4, 5, & 6+, BOSEconomy 6 & 7, Essentials Economy 2.2.17+ or MultiCurrency will work.
    • Download and extract the hBank archive - link below. It contains a default, commented config file that won't be loaded on startup. I highly recommend editing this to suit your needs (set up banks, and bank owners) before starting the server up with hBank enabled.
    • /hbank - Banking command
      • Usage: /hbank <join|leave|invite|kick|withdraw|deposit|balance|info|list|accept|deny|members|check> [value]
        • Join: Attempts to join the bank with the ID you specified. Cannot join private banks.
        • Leave: Leaves your current bank. All bank funds are transferred out of your account.
        • List: Lists all available banks
        • Invite: Owner only. Invites a player to your bank. Only usable with private banks, and players with no existing account.
        • Kick: Owner only. Boots the player specified out of your bank. As with leaving a bank, they retain all funds. Can only be used with private banks.
        • Withdraw: Withdraws money from your bank account. Requires a bank account.
        • Deposit: Deposits money into your bank account. Requires a bank account.
        • Balance: Gives you information on your account - current balance, and the hours left until interest is calculated.
        • Info: Gives you the information of the bank ID given - Name, Owner, Fees, Interest rate, and if it is private or not.
        • Accept: Accepts an invitation to a private bank.
        • Deny: Rejects an invitation to a private bank.
        • Members: Lists the members of any non-private bank (Can list the members of a private bank you're a member of)
        • Check: Owner only. Checks the account balance of any of the members of your bank.
        • Reload: Reloads the hBank config. Checks against Op status for permission.
    • /hbanka - Admin command:
      • Usage: /hbanka <mode> <config node> <value>
        • Mode: 0 for general stuff, 1 for numbers
        • Config node: This is a bit more complex. For general usage, you'll be modifying bank nodes, so you'll want banks.<bank id>.subnode where subnode is the property, which can be any of name, owner, interest, private, fees.startup or fees.transaction.
        • Value: What you want to set the config node to. The nodes interest, fees.startup and fees.transaction are numbers, so not using the number input mode will break things, and throw errors.
      • This is basically a direct input into the config variable in the plugin, so there are no safety checks on what you do with it. Its access is limited to either ops, or those in the admins array in config.yml. If you aren't sure how to use it, ask me, or don't go near it.

    I will give support (Help you with errors, fix bugs) for this, but forum responses might be delayed. Generally catching me on steam (hatstand2371) is a lot faster.​


    .zip w/ Example Config file
    Direct .jar link

    Credit where its due:
    • Nijikokun - That genius Register API
    • Forecaster - Guineapig/Tester
    • 1.53
      • Fixed warnings for iConomy 4, 5 & 6's Register methods. Shouldn't change any functionality, but nice to have.
    • 1.52
      • Hopefully the final fix for disappearing users
    • 1.51
      • Another attempted fix for disappearing users - Didn't work either.
    • 1.5
      • Now has Bukkit permissions support, using the same node format. Will use these if no valid Permissions plugin is found and you've enabled permissions.
    • 1.42
      • Fixed errors with BOSEconomy & Potentially Essentials Economy
    • 1.41
      • Fixed interest ticks getting reset
      • Updated the reported version number
    • 1.4
      • Implemented register. Now supporting a pile of economy frameworks. Should hopefully fix some issues with other plugins.
    • 1.3
      • Fixed users vanishing on /reload - Nope.
      • Changed permission nodes - See above for information
      • Re-Fixed default config file
      • Added bank access permissions via perbankpermissions in config.yml
      • Added custom interest interval (in hours) via interestperiod in config.yml
      • Fixed a few nulls
    • 1.23
      • Fixed default config file creation, fixed error when not using WorldGuard, fixed a few other bugs
    • 1.22
      • Uses the default colours if it can't find a custom definition of them
    • 1.21
      • More bugfixes
    • 1.2
      • Added /hbank reload for configuration reloads (Read: Edit while the server is running), fixed a pile of bugs
    • 1.1
      • Fixed Commands, added optional WorldGuard & Permissions support
    • 1.0
      • Released
  2. Offline


    Videos? Pictures? anything plz? :D
  3. Offline


    hey i have the problem that hbank dont save the user accounts by a restart (i use the remote toolkit plugin), can you fix that?
  4. Offline


    As I've told everyone who has reported it - Give me the logs from the server restart, your config, hBank version, etc, else I can't do anything.
  5. Offline


    okay sorry, the infos:

    version: 1.51
    interestperiod: 1
    time: 1
    opmode: false
    usepermissions: true
    useworldguard: true
    perbankpermissions: false
    - TheShadow777
    - RED
    - YELLOW
    - GOLD
    - WHITE
            interest: 1.25
            name: PostBank
            owner: TheShadow777
            - bankbereich
                transaction: 0
                startup: 2000
            private: false
            bank: postbank
    line from the restart:
    2011-09-04 17:43:33 [INFO] [hBank] Cancelling Tasks
    2011-09-04 17:43:33 [INFO] [hBank] Saving Config
    2011-09-04 17:43:33 [INFO] [hBank] Not saving TheShadow777-postbank: Invalid bank!
  6. Offline


    Awesome! I think I got it this time, try the latest version.
  7. Offline


    Finally, the banks work with wiping each time. I was starting to give up on this plugin. Anyway, great work.
  8. Offline


    Small annoyance: When using iConomy, /money shows all of your cash, including hbank. Is there a way to check ONLY the cash on hand? or "wallet" as hbank calls it.

    Never mind, I am just being a tard. I forgot the transaction fee. The plugin works great! and is much better than iConomy's confusing mess.

    So where is this data stored? How can it be cleared? We want the cash in banks and iConomy to carry over for 1.8
  9. Offline


    The plugin keeps track of the accounts in the config file, but all the balances and actual accounts are handled by whatever economy framework you're using, stored as <bank id>-<username> (defaultbank-hatstand, for example), so unless you wipe the entire economy database, it'll stay there.
  10. Offline


    Awesome, thanks for the reply!
  11. Offline


    Wait, so this is a bank plugin where you can access your bank account ANYWHERE? like, i mean you can't set parameters?
  12. Offline


    You missed the part where you can limit access to WorldGuard regions.
  13. Offline


    is this compatible to regio's regions? i figure not.. but adamki11a is about to release his new version with api.
    it would be really sweet if i could lock banks to regio's regions
  14. Offline


    Heya! I really like the way that your plugin works, big fan of it.
    Definitely the best banking plugin I've come across, by a long shot.

    The only real problem I have is that it doesn't seem to work with iConomy 6.
    I'll post the error message below, but I think that's the problem as it doesn't seem to register a payment method with iConomy 6. iConomy 5 works almost as intended, with some minor errors with transaction fees (i.e., not taking the amount on withdrawal, and sometimes crediting the amount on a deposit, as opposed to charging it). There are no error messages that occur when that happens.

    Anyway, when I try to use a command like /hbank info [name] (something that shows or uses a fee) I get this, when using iConomy6:
    02:43:38 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'hban
    k' in plugin hBank v1.52
            at org.bukkit.command.PluginCommand.execute(
            at org.bukkit.command.SimpleCommandMap.dispatch(
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(
            at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.
            at net.minecraft.server.NetServerHandler.a(
            at net.minecraft.server.Packet3Chat.a(
            at net.minecraft.server.NetworkManager.b(
            at net.minecraft.server.NetServerHandler.a(
            at org.getspout.spout.SpoutNetServerHandler.a(
            at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
            at net.minecraft.server.MinecraftServer.h(
    Caused by: java.lang.NullPointerException
            at me.hatstand.hBank.hBank.handleBankCommand(
            at me.hatstand.hBank.hBank.onCommand(
            at org.bukkit.command.PluginCommand.execute(
            ... 13 more
    If I remember correctly there was one more thing, but at the moment it escapes me.
    Anyway, if you could maybe offer some help with that (or those) I'd greatly appreciate it.

    Also if you're open to suggestions, I've got a few. 'ppreciate it!

    Oh, almost forgot the config:
    interestperiod: 12
    time: 24
    opmode: true
    usepermissions: true
    useworldguard: false
    perbankpermissions: false
    - adminguy
    - RED
    - YELLOW
    - GOLD
    - WHITE
            interest: 1.0
            name: Gatton Global
            owner: Khalkhalash
            regions: []
                transaction: 2
    .00            startup: 20
    .00        private: false
            bank: gatton
    Using the latest version.
  15. Offline


    trying to access hbank in WG region: wtbank
    permissions i have:
    - hBank.commands.use
    - hBank.commands.join
    - hBank.commands.leave
    - hBank.commands.withdraw
    - hBank.commands.deposit
    - hBank.commands.balance
    - hBank.commands.balance
    - hBank.commands.check

    my use: /hbank <anything>
    my error: hBank : You do not have the required permissions
    my face: :(

    interestperiod: 24
    time: 21
    opmode: false
    usepermissions: true
    useworldguard: true
    perbankpermissions: false
    - adminguy
    - RED
    - YELLOW
    - GOLD
    - WHITE
    interest: 0.0
    name: World Trust Bank
    owner: WTB
    - wtbank
    transaction: 0
    startup: 0
    private: false
    bank: wtb
    bank: wtb

  16. Offline


    Are the .00's on new lines in your actual config?

    If so, that could be it.

    If not, that's an issue with iConomy 6's formatting function - The only thing it does on that line in your stack trace. Uploaded 1.53, which fixed warnings for iConomy 4, 5 & 6's Register methods, which, again, could be it.

    Could be that they permissions are case-sensitive - if they are, change them to all lowercase.
  17. Offline


    I got a problem with the Plugin:

    "Interest in: -57 hours" and we dont get the interest.
    I dont know what to do:

    interestperiod: 24
    time: 24
    opmode: true
    usepermissions: false
    useworldguard: true
    - adminguy
    - RED
    - YELLOW
    - GOLD
    - WHITE
            interest: 0.5
            name: Normalo Bank
            owner: BANK
            - bank
                transaction: 4
                startup: 64
            private: false
            interest: 5
            name: ICHBINREICH Bank
            owner: BANK
            - bank
                transaction: 32
                startup: 2048
            private: false
            bank: Normalo, Reich
            bank: Normalo
  18. Offline


    You've got me stumped, interest has ticked normally in every test I've run, and works fine on my production server. It should never end up negative hours left, unless the thread for it is crashing somewhere, in which case there would be errors somewhere. Uploaded a quick fix for the hours left ending up negative somehow.

    Also, how did you end up with a user having multiple banks? I realise thats a dummy user, but still, that shouldn't work at all - it should be getting erased whenever the users get saved.
  19. Offline


    With or without the .00's, the issue is the same.

    I tried the new version. Basically the same problem, but without error messages now.
    I have Essentials installed, so it's ignoring iConomy 6 and registering payment through Essentials.

    I'm definitely not an expert so it could very well be iConomy 6 that's causin' the problem,
    but this is the only mod that it conflicts with. Every other mod I'm using can hook into it just
    fine, according to the console.
  20. Offline


    i tried them all lowercase, iconomy perms are iConomy. and they work fine.

    i saw someone else had this problem once but i cant find his post anymore.

    error: you dont have required perms..
  21. Offline


    Quick fix is uploaded? The Direct .jar link dosnt change my problem.

    Yeah, the dummy user was never saved (invalid Bank). This wasnt a problem because yes, its a dummy user. :>
    Or would it damge every user/ plugin?

    -sry, i'm not the best in english ;)
  22. Offline


    thanks now works perfekt with restarts :)
  23. Offline


    @drt you using pex? I had same issue...I looked in the jar and you need to be all lower case, but i also added hbank.banks.* Wanna see if that works?
  24. Offline


    Ah now it works (I just reload the hbank config, noob yeah^^) with plugins reload.

    Thank you!
  25. Offline


    oh... uh... sorry ^-^
  26. Offline


    does not work, added hbank.banks.*( tried hbank.banks.wtb too). everything is lowercase.
    yes, i'm using pex.
    im about angry..
  27. Offline


    how do i create a new bank?

    seems to work fine with default bank but idk how to make a public/private bank how would i do that?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 18, 2016
  28. Offline


    Could you add support for multiple interests for one bank, and non-percent interests? I want a bank to give an interest of 5$ every 15 minutes. Apart of that, every 24 hours I want to subtract 5% of the money on the accounts (kind of tax).
    It would be really nice if you could add these features. :)
  29. Offline


    How About variable interrest?!
    That a bank with a high amount of money could have (or get automatic) higher interests.
    So that having an own bank is useless until you have very rich or just alot people joining your bank.

    Or just a command to see how much money is on wich bank, like a /bank top command

    /bank top
    1. blablalba 5.444.333,00
    2. dudidu 3.999.123,00
    ...and so on

    Or a statistic file to be created in the pluginfolder

    So that host could change the interests and fees on his own, by using this toplist or statistic file
  30. Offline


    Excellent plugin. However, I'd love to see support for Residence regions. The only use we have for WorldGuard is for hBank, and I'd really like to do away with WG altogether.

    A couple more suggetions:
    - ability to offer loans at a variable interest rate
    - ability to create a 'server-owned' bank.
  31. Offline


    love the plugin - thing is it didnt seem to work with bukkit build 1135+ for me - i am currently using 1185 and waiting for an update for this. If it has been confirmed to work please let me know cus it means i have a conflicting plugin or config is mucked up etc. also if maybe a dev build of hbank works with 1185 that would also be great

Share This Page