iConomy / Register API help

Discussion in 'Plugin Development' started by quaz3l, Dec 31, 2011.

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

    quaz3l

    I have a plugin that needs to give money rewards but I am having trouble with the API's. I want to support as many economy plugins as possible so I tried using register, but when I try to check if a player has an account it gives me a NullExceptionError when I run it. Here is the relevant code:
    PHP:
    // Setup Economy
        
    Method economy Methods.getMethod();
    // ...
    if(economy.hasAccount(player.getName()))
                {
                
    player.sendMessage(ChatColor.GREEN player.getName());
                
    MethodAccount account economy.getAccount(player.getName());
                
    account.add((double) getQuestConfig().getInt("0.market.reward.money"));
                }
    Everything is imported correctly and the package is named differently than original register to avoid conflicts.

    If there is a better plugin to work with many economies or if none of these work how would I work with iConomy.
     
Thread Status:
Not open for further replies.

Share This Page