Development Assistance Something wrong here?

Discussion in 'Plugin Help/Development/Requests' started by PerezHD, Dec 24, 2014.

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

    PerezHD

    Code:
            if (args.length == 1){
                if (args[0].equalsIgnoreCase("give")){
                    if(!p.hasPermission("arrowtp.give")){
                        p.sendMessage(this.plugin.prefix + ChatColor.RED + "You do not have enough permissions to execute this command!");
                    }
                    else if (p.hasPermission("arrowtp.give")){
                        p.sendMessage(this.plugin.prefix + ChatColor.AQUA + "You have given yourself a bow and arrow!");
                        p.getInventory().addItem(bow);
                        p.getInventory().addItem(arrow);
                        p.updateInventory();
                        return true;
                    }
                if (args[0].equalsIgnoreCase("reload")){
                    if (!p.hasPermission("arrowtp.admin")){
                        p.sendMessage(this.plugin.prefix + ChatColor.RED + " You do not have enough permissions.");
                    }
                    else {                   
                        this.plugin.reloadConfig();
                        this.plugin.loadPrefix();
                        p.sendMessage(this.plugin.prefix + ChatColor.GREEN + " Configuration has been reloaded!");
                        return true;
                        }
                    }
                }
              }
    Well I am attempted to work with args here. Now in game, the main command for the arguments is /bow.
    So for the first argument, (/bow give) it works fine. But when I attempt to do (/bow reload) nothing wants to show up or work in-game. Please help me.
     
  2. Offline

    blondy2247

    What exactly are you trying to code here?
     
  3. Offline

    PerezHD

    Its just arguments, I am confused on whats going on. the /bow give command works fine, but the /bow reload doesn't work.
     
  4. Offline

    blondy2247

    Well its probably cause u can't reload a bow.
     
  5. Offline

    PerezHD

    Your not getting what the issue is at all. I am not talking about actually reloading a item BOW.... I am talking about reloading the config. The arguments is broken. The main command is /bow.
     
Thread Status:
Not open for further replies.

Share This Page