[Solved] using depositPlayer(arg0, arg1) to pay player on event (VAULT)

Discussion in 'Spigot Plugin Development' started by Exus-Kun, May 17, 2015.

Thread Status:
Not open for further replies.
  1. Hi, although I do know java and bukkit.. this one is really tripping me up.

    I wanted to make a simple plugin that pays players (config) amount of money once a player is killed.

    Code:
    Code (Text):
    Classified
    Just cant crack the code, the plugin works just fine but it comes across an error in the console on line 43, which is "econ.depositPlayer(killer, d);".

    I've tried
    Code (Text):
    econ.depositPlayer(killer.getName(), d)
    econ.depositPlayer(killer.getDisplayName(), d)
    econ.depositPlayer(killer.getPlayerListName(), d)
     
    but they all don't want to work.

    Suggestions?
     
    #1 Exus-Kun, May 17, 2015
    Last edited: May 17, 2015
  2. the economy is null
    add
    Code (Text):
    setupEconomy()
     
  3. A fix? First time working with Vault and I can't seem to find anything on their API :\
     
  4. call setupEconomy, and disable the plugin if it returns false...
     
    • Like Like x 1
  5. Thank you, it's working now.

    Now to update the threads prefix...
     
  6. (If you want to get it locked, as it's solved, report the thread/any post with the reason being that it's solved)
     
    • Useful Useful x 1
  7. dtm

    dtm Retired Moderator
    Retired Supporter

    Locked per request.
     
    • Like Like x 1
Thread Status:
Not open for further replies.