Add tab completion for find command. Also change api a bit.

This commit is contained in:
md_5
2013-09-15 07:37:20 +10:00
parent d67acd7bc9
commit e998faeec1
4 changed files with 42 additions and 5 deletions

View File

@@ -145,7 +145,10 @@ public class PluginManager
command.execute( sender, args );
} else if ( command instanceof TabExecutor )
{
tabResults.addAll( ( (TabExecutor) command ).onTabComplete( sender, args ) );
for ( String s : ( (TabExecutor) command ).onTabComplete( sender, args ) )
{
tabResults.add( s );
}
}
} catch ( Exception ex )
{

View File

@@ -2,10 +2,9 @@ package net.md_5.bungee.api.plugin;
import net.md_5.bungee.api.CommandSender;
import java.util.List;
public interface TabExecutor
{
public List<String> onTabComplete(CommandSender sender, String[] args);
public Iterable<String> onTabComplete(CommandSender sender, String[] args);
}