Solved Shouldn't this work?

Discussion in 'Plugin Development' started by PimpDuck, May 12, 2014.

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

    PimpDuck

    This isn't working, and it should.. No errors or anything, like the code gets skipped or something.
    Code:java
    1. for(Player p : Bukkit.getOnlinePlayers()){
    2. if(p.hasPermission("dclottery.donator")){
    3. EconomyResponse r = econ.bankDeposit(p.getName(), (int) winnersmoney);
    4. if(r.transactionSuccess()){
    5. p.sendMessage(ChatColor.GOLD + "You have been given " + ChatColor.RED + "$" + (int) donatorsmoney + ChatColor.GOLD + " from the lottery for being a donator. Thank you for donating to Diamcraft!");
    6. }
    7. }
    8. }
     
  2. Offline

    Mayoz

    I'd be helpful to see all the code. Are you sure the player has the permission? You could try to check and see if they're op to see if that's the issue.
     
  3. Offline

    PimpDuck

    Whoops, it should have been depositePlayer not bankDeposite xD
     
Thread Status:
Not open for further replies.

Share This Page