Development Assistance Help With Vault. Need some help

Discussion in 'Plugin Help/Development/Requests' started by BuxysRay, Feb 25, 2015.

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

    BuxysRay

    Hi everyone, I'm not american, I'm brazilian but I will try to type everything right.

    I need some help. I want to create a Economy plugin and I want to set an GiveMoney command, but I have a problem.

    Look:


    Code:
    if(cmd.getName().equalsIgnoreCase("givemoney")){
                    if(args.length == 0){
                        p.sendMessage(ChatColor.RED + "Please specify a player");
                    }
                    if(args[0].length() >= 1){
                        if(args[1].length() == 0){
                            p.sendMessage(ChatColor.RED + "Plase specify a quantity");
                        }
                        if(args[1].length() >= 1){
                            Player p2 = Bukkit.getServer().getPlayer(args[0]);
                            char[] q = args[1].toCharArray();
                           
                            EconomyResponse r = econ.bankDeposit(p2.getName(), q);
                        }
                    }
                }
    The other things are working good, but in the part of giving a quantity, I have a problem, the args[1] is an string format and I can't transform him into a double format.

    Please help me as faster you can plz.

    By now, thanks for reading
     
  2. Offline

    jeremygascan

    I can help you with this problem as soon as I get home for school.

    ~Jeremy
     
    BuxysRay likes this.
  3. Offline

    BuxysRay

    Ok, thank you
     
  4. Offline

    BuxysRay

    Noone will help?
     
  5. Offline

    timtower Administrator Administrator Moderator

    @BuxysRay Integer.parseInt(string)
    Will throw an exception if it isn't an integer.
     
Thread Status:
Not open for further replies.

Share This Page