"Team" system

Discussion in 'Plugin Development' started by H4ThePenguin, Jan 29, 2013.

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

    H4ThePenguin

    When someone does /j their username gets added to an ArrayList, and when someone does /s I want it to divide them(people in arraylist) into 4 (kinda equal) teams, I'm guessing teams via permissions, but I don't know. How would I do this?
     
  2. Offline

    JHA™

    More information on what your are doing exactly?
     
  3. Offline

    ZeusAllMighty11

    Code:
    public List<String>blueTeam = new ArrayList<String>();
    public List<String>redTeam = new ArrayList<String>();
     
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
        if(cmd.getName().equalsIgnoreCase("j")){
            if(sender instanceof Player){
                
                //
                
            } else {
            sender.sendMessage(ChatColor.DARK_RED + " You must be a player to do this! " );
        }
    }
    
    I don't know where to go from there for dividing it, but you should get the point
     
Thread Status:
Not open for further replies.

Share This Page