Add tab completion for find command. Also change api a bit.
This commit is contained in:
@@ -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 )
|
||||
{
|
||||
|
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user