title: Java method arguments not applicable
body: <p>First, appologies for the lack of a better title. Hopefully someone with more experience in Java is able to change it to something more appropiate.</p>
  
  <p>So I'm faced with the following exception:</p>
  
  <blockquote>
    <p>The method copyPartialMatches(String, Iterable, T) in the type
    StringUtil is not applicable for the arguments (String, String[],
    List)</p>
  </blockquote>
  
  <p>The <a href="https://jd.bukkit.org/org/bukkit/util/StringUtil.html" rel="nofollow noreferrer">documentation</a> for this method states:</p>
  
  <blockquote>
    <p>Parameters:<br/>
        token - String to search for<br/>
        originals - An iterable collection of strings to filter.<br/>
        collection - The collection to add matches to<br/></p>
  </blockquote>
  
  <p>My code:</p>
  
  <pre><code>public class TabHandler implements TabCompleter {
      private static final String[] params = {"help", "menu", "once", "repeat", "infinite", "cancel"};
  
      @Override
      public List&lt;String&gt; onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
          final List&lt;String&gt; completions = new ArrayList&lt;&gt;();
          StringUtil.copyPartialMatches(args[0], params, completions);
  
          Collections.sort(completions);
          return completions;
      }
  }
  </code></pre>
  
  <p>I'm fairly certain the problem lies with the <code>completions</code> List. Perhaps this is not a valid collection? It was my understanding that it was, but right now I'm just at a loss here. So hopefully you guys can help me out.</p>