Loaning Money in Vault

Discussion in 'Plugin Development' started by jay275475, Nov 17, 2013.

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


    So Im in a middle of a plugin and I Cant figure Out How to loan money in bukkit I got some of it done here.
    1. if(command.getLabel().equals("Burrow")) {
    2. // Lets give the player 1.05 currency (note that SOME economic plugins require rounding!)
    3. sender.sendMessage(String.format("You have %s", econ.format(econ.getBalance(player.getName()))));
    4. EconomyResponse r = econ.depositPlayer(player.getName(), );
    5. if(r.transactionSuccess()) {
    6. sender.sendMessage(String.format("Your Loan was %s and now you have %s", econ.format(r.amount), econ.format(r.balance)));
    7. } else {
    8. sender.sendMessage(String.format("An error occured: %s", r.errorMessage));
    9. }

    But Where it says EconomyResponse r = econ.depositPlayer(player.getName(), ); I can figure out what do put after the comma I tried args[0] Because thats What I want it to read but it didnt work I would also like to set a limit can anyone help me?
  2. Offline


    You'll need to parse the String value for the amount of money that is being transfered as a double.
  3. Offline


    I think I tried that it still didnt work

    Anyone else Can help?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jun 5, 2016
Thread Status:
Not open for further replies.

Share This Page