Remove money from a balance (economy) ?

Discussion in 'Plugin Development' started by ThunderWaffeMC, Jun 26, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    ThunderWaffeMC

    Using an economy (I'm using iConomy) how can I make it so it removes $1000 from a players balance on command (I just need to know the code to remove the money)?

    Thanks!
     
  2. Offline

    Doodledew

    To remove money:

    econ.withdrawPlayer(p.getName(), 1000);
     
    ThunderWaffeMC likes this.
  3. Offline

    wizzinangel

    or
    econ.depositPlayer(p.getName(), -1000);
     
  4. Offline

    ThunderWaffeMC

  5. Offline

    wizzinangel

    The -1000 will take it off them :-P (Negative amount)
     
  6. Offline

    toughenough6

    I'd highly suggest using Vault to integrate into multiple economy plugins. It supports iConomy, as well as a ton of other ones making your plugin work for nearly anyone. Vault is really easy to use, you just add vault.jar as an external .jar, the same thing you did with the bukkit api, and then it's really easy to find a Vault tutorial / example. I learned it straight away on my first try with no hassle.
     
  7. Offline

    ThunderWaffeMC

    I am using vault. But thanks!
     
Thread Status:
Not open for further replies.

Share This Page