Solved Taking money away from player when perform command

Discussion in 'Plugin Development' started by InspectorFacepalm, Jun 2, 2013.

Thread Status:
Not open for further replies.
  1. I have a question, how do you take away money from a player when someone performs a command, for example I want it to take away 200 dollars when someone does /test
     
  2. Offline

    Garris0n

    What money...
     
  3. Offline

    bobacadodl

    He means ingame money.. such as Essentials Economy.

    Use the Vault API. It makes it very easy to hook into most economy plugins & take away or give money to players.
     
  4. k, I hooked it up, but how does one exactly make it take money when someone does /test

    what bob said l;

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 1, 2016
  5. Offline

    bobacadodl

    Read the vault documentation -.-
    If you know basic java, and how to setup an onCommand() method, it should be easy!


    http://mythcraft.dyndns.org/javadoc/vault/

    EDIT:
    bankWithdraw(String name, double amount)
    ^ use that method!

    Also, make sure to setup vault properly in your plugin

    take a look @ https://github.com/MilkBowl/Vault and scroll down to the "Implementing Vault" section
     
    InspectorFacepalm likes this.
  6. ahh, didn't see that, thanks!
     
  7. Offline

    Garris0n

    bobacadodl I meant as in what sort of economy...for all I know he could be writing his own.
     
    InspectorFacepalm likes this.
  8. Essentials economy :p!
     
Thread Status:
Not open for further replies.

Share This Page