title: Combine args into a sentence in Bukkit?
body: <p>I am having trouble with something that seems so simple. How do i get a sentence from a command?</p>
  
  <p>If a user entered : <code>/command i want to get this with spaces minus the command</code> and pressed enter, i would need to get this :</p>
  
  <p><code>myString = "i want to get this with spaces minus the command";</code></p>
  
  <p>How would i do this? A loop? And what would the the fastest, most efficient way to do this?</p>
  
  <p>Thanks. This is what i have so far:</p>
  
  <pre><code>public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
      if (cmd.getName().equalsIgnoreCase("command"))
      {   
          if(args.length &gt; 0)
          {
              sender.sendMessage(ChatColor.RED + "/command &lt;message&gt;");
          }
          else
          {
              if (!(sender instanceof Player)) {
                  sender.sendMessage("This command can only be run by a player.");
              } 
              else 
              {
                  Player player = (Player) sender;
                  // Check to make sure nothing is null or empty
                  if(args[0].equals(" ") || args[0].equals("") || args[0] == null)
                  {
                      // Do command !!
                  }
                  else
                  {
                      player.sendMessage(ChatColor.RED + "Please enter a &lt;message&gt;");
                  }
              }
          }
          return true;
      }
      return false;
  }
  </code></pre>