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

    hatstand

    hBank - Banks, now with 100% more register.

    Version: 1.53 (Permissionerer)

    Foreword:
    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.

    Dependencies:
    • Any one of iConomy 4, 5, & 6+, BOSEconomy 6 & 7, Essentials Economy 2.2.17+ or MultiCurrency
    Optional:
    • 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.
    Features:
    • 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
    Installation:
    • 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.
    Commands:
    • /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.
    Support:

    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.​

    Downloads:

    .zip w/ Example Config file
    Direct .jar link

    Credit where its due:
    • Nijikokun - That genius Register API
    • Forecaster - Guineapig/Tester
    Changelog:
    • 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

    fatmarley

    I have been waiting for this, but I wonder if you have any intentions to use permissions?

    Also,there was another bank mod that came out about a month back, hasnt been updated since, so I will just pile my feature requests on you now, if you dont mind.

    Show Spoiler


    Could it be possible to make it so banks could be created and owned by a players
    -So for 10,000,000 dollars you could start a bank
    -Bank needs to have a building space, like a shop
    -Owners of banks can charge a service fee for joining
    -Banks then have a huge pool of money that will gather interest from a Main Bank (an Op Bank with infinite money)
    -Players who have joined a bank will gain a percentage of that interest.


    1. Op creates Bank - It can only be joined by other banks, not players.
    2 Player1 creates a bank for 10,000,000.
    Configs his Bank as such - Join Fee 1000, Interest earned .2%, Transaction Fee 100, Deposit Fee 0,
    3 Players 3,4,5,6,7 join his bank. The pool of money has increased and the amount of interest earned from the Op Bank
    is roughly 1000 dollars. Based on amount in the Player bank Players 3,4,5,6,7 gain a small percentage of that interest.
    4 Bank owner can not withdraw from created bank. All joining and transaction fees are added to the money pool creating a larger amount of interest.
    5 Bank owner gets a higher percentage of the interest and all fees are waved.

    So Banks can be competitive and offer better and better incentives for players to join with them.

    This is a bit heavy, I apologize, but if you would consider something like this I would be happy to test it on my server. We have just recently started to use banking cause the server has started to get heavy on teh PVP and everyone is scrambling to find a way to protect their money.
     
  3. Offline

    hatstand

    I have no use for permissions with this, I don't need to deny access to any of my players.

    So I would ask you this - What is it you want to control via permissions?
     
  4. Would it be possible to have a select area where the bank commands could only be used for example for the RP server I run I have a bank I''d like it so these commands could only be used in that facility?

    Thanks,
    Connor
     
  5. Offline

    hatstand

    Ironically, that was part of my original plans for this - to use WorldGuard regions for accessing banks. I actually checked out how to do it in the early stages as well, so it wouldn't be hard to do, unless you're after an integrated area selection/creation thing, separate of any external plugins.
     
  6. Offline

    Plague

    title is missing plugin version
     
  7. Offline

    hatstand

    ...And I thought I was thorough when I checked the guidelines. Fixed.

    Just a heads up to anyone who plans on using this - until I get 1.1 done tonight, this plugin is horribly bugged, as I forgot to change the command handler to use the new command names before release.

    I'd update it now, but I'm in the middle of implementing optional Permissions and WorldGuard support.

    (several hours later)

    1.1 Released - Permissions & WorldGuard support

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

    noahwhygodwhy

    i might just use this because of the title...but doesn't iConomy already have a banking system? or did i download a banking system and forget about it.....
     
  9. Offline

    Nijikokun

    iConomy removed banks in 6 & TAT already released a banking plugin
     
  10. Offline

    hatstand

    And competition is a bad thing?
     
    sourcemaker, Later42 and DrPinkies like this.
  11. Offline

    Jacobfish

    Would it be possible to link this with the Iconomychestshop plugin in any way?
    I just think it would be cool to have a shop where its possible to have more than one owner.
     
  12. Offline

    hatstand

    Doubtful, both because there is (currently) no way to share accounts between users, and it would depend on if you can set the owner/owner account for the chest shops.
     
  13. Offline

    Forecaster

    I've tried this plugin (latest version as of typing) on cb 1000 and it has worked poorly so far.

    I've had some "internal errors" in-game while trying to use the "/hbank info" command.

    It didn't seem to acknowledge my bank region despite it being set in the config of my bank as the example instructed.

    Trying to interract with the bank either resulted in a "you have to be in a bank region" message or an internal error which resulted in this console output: http://pastebin.com/Z19amVnZ

    It's also annoying that I have to shut down the server to edit the config.

    What I like is the prospect of integrating with worldGuards regions instead of having a separate system. I also like the idea of player owned banks although I'm unsure what that entails, does the fees go to the owner of the bank?

    I also added you on Steam (with the same name for me too) in case you wouldn't mind more rapid correspondence. ^^
     
  14. Offline

    hatstand

    First things first, post your config, and check the region actually exists/is spelled correctly.
     
  15. Offline

    jarafo12

    can you make a way or tell me how to make banks in game
     
  16. Offline

    hatstand

    Just finished up 1.2 with the help of @Forecaster - You can edit config.yml while the server is running now, and reload it with /hbank reload
     
  17. Offline

    jarafo12

  18. can you add a credit function ?
    and a limt for the credit ?
     
  19. Offline

    TheShadow777

    hm nice plugin but dont work for me, /hbank list works but other commands like /hbank join name dont work..

    error log:
    org.bukkit.command.CommandException: Unhandled exception executing command 'hbank' in plugin hBank v1.0
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:320)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:713)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:677)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:670)
    at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NoClassDefFoundError: com/sk89q/worldedit/Vector
    at me.hatstand.hBank.hBank.isInBankZone(hBank.java:217)
    at me.hatstand.hBank.hBank.handleBankCommand(hBank.java:449)
    at me.hatstand.hBank.hBank.onCommand(hBank.java:380)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    ... 12 more
     
  20. Offline

    hatstand

    Thanks for that, should be fixed.
     
  21. Offline

    fatmarley


    I added in a lovely spoiler section, explaining WHY I wanted permissions. Thank you for installing them, but if you could take a look at my first post and take a gander at my ideas.
     
  22. Offline

    hatstand

    I swear I read that exact thing (In the spoiler) somewhere before.

    In response, though:

     
  23. Offline

    Scroll Tro0L

    Gettin dish here error:
    Code:
    10:26:08 [SEVERE] Error occurred while enabling hBank v1.0 (Is it up to date?):
    Index: 0, Size: 0
    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
            at java.util.ArrayList.RangeCheck(Unknown Source)
            at java.util.ArrayList.get(Unknown Source)
            at me.hatstand.hBank.hBank.onEnable(hBank.java:102)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
    .java:857)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    r.java:264)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:151)
            at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:136
    )
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:284)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:271)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:148)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:335)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Many sad faces, can't find another bank plugin that lets me define bank zones.
     
  24. Offline

    hatstand

    That would be it freaking out because it can't load the list of colours. Check your config still has the colours lines in it. Give me a minute and I'll make it default to the default colours if it can't find that.

    Edit: Done, updated.

    Edit2:

    Sorry, didn't notice your question - Its possible, but a bit complicated to do. I'll look into it.
     
  25. Offline

    Scroll Tro0L

    You spoil me with your timely response!

    But it seems like it's THAT time of the year where errors are reproducing like bunnehs:

    Show Spoiler
    11:04:21 [SEVERE] Error occurred while enabling hBank v1.0 (Is it up to date?):

    null

    java.lang.NullPointerException

    at me.hatstand.hBank.hBank.onEnable(hBank.java:137)

    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)

    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader

    .java:857)

    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage

    r.java:264)

    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:151)

    at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:136

    )

    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:284)

    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:271)

    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:148)

    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:335)

    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)


    I didn't quite catch what you meant by settings teh colors in my config file (which config file and how?)
    Also, this should be of more significance and understanding to you; does its spatting of "hbank v1.0" mean anything?
     
  26. Offline

    hatstand

    ...Another error on loading the config. Check that you actually have a config.yml set up in the hBank plugin folder (You don't have any banks defined). There's an example in the .zip download if you need a reference.

    On that note, should also catch if there are no banks.
     
  27. Offline

    Scroll Tro0L

    Problem Owned! (muchos gracias to hatstand for da steam support)

    Delete the hbank config and let it generate again = happiness in a console

    Now im guna go get rich, CYA!
     
  28. Offline

    Dec64

    I created a region, aswell as naming it in the config as per example, yet while in the region and typing the command, it still says that i need to be in the region? Am i missing something utterly obvious here,

    here is my config

     
  29. Offline

    hatstand

    You don't seem to have missed anything, I would check the capitalisation and spelling again.
     
  30. Offline

    Dec64

    Strange, as i have triple checked all capitalisation and spelling, still no luck, also get this error when doing any /hbanka commands.


    I also tried to add you on steam as "hatstand" not sure if it worked, my steam is "Declan64"
     

Share This Page