if ( tabComplete.getCursor().startsWith( "/" ) )
{
bungee.getPluginManager().dispatchCommand( con, tabComplete.getCursor().substring( 1 ), suggestions );
}
TabCompleteEvent tabCompleteEvent = new TabCompleteEvent( con, con.getServer(), tabComplete.getCursor(), suggestions );
bungee.getPluginManager().callEvent( tabCompleteEvent );
List<String> results = tabCompleteEvent.getSuggestions();
if ( !results.isEmpty() )
{
con.unsafe().sendPacket( new TabCompleteResponse( results.toArray( new String[ results.size() ] ) ) );
throw CancelSendSignal.INSTANCE;
}
if ( tabCompleteEvent.isCancelled() )
{
throw CancelSendSignal.INSTANCE;
}
}