downloadFileDirect public byte downloadFileDirect( String filePath,.Parameters: dataOut - a stream that the downloaded data should be written to filePath - the path of the file on the file repository channelId - the ID of the channel to download the file from channelPassword - that channel's password Returns: how many bytes were downloaded Throws: TS3CommandFailedException - if the execution of a command fails TS3FileTransferFailedException - if the file transfer fails for any reason See Also: FileInfo.getPath(),ĭownloadFileDirect(String, int, String) Number of query commands sent: 1 downloadFile public long downloadFile( OutputStream dataOut,.Parameters: dataOut - a stream that the downloaded data should be written to filePath - the path of the file on the file repository channelId - the ID of the channel to download the file from Returns: how many bytes were downloaded Throws: TS3CommandFailedException - if the execution of a command fails TS3FileTransferFailedException - if the file transfer fails for any reason See Also: FileInfo.getPath(),ĭownloadFileDirect(String, int) Number of query commands sent: 1 Note that this method will not read the entire file to memory and can thusĭownload arbitrarily sized files from the file repository. Open and to close the stream again once the download has finished. It is the user's responsibility to ensure that the given OutputStream is createServerSnapshot public Snapshot createServerSnapshot()ĭownloads a file from the file repository at a given path and channelĪnd writes the file's bytes to an open OutputStream.Parameters: name - the name for the new virtual server options - a map of options that should be set for the virtual server Returns: information about the newly created virtual server Throws: TS3CommandFailedException - if the execution of a command fails See Also: VirtualServer Number of query commands sent: 1 Unlicensed TS3 server instances are limited to 1 virtual server with up to 32 client slots. Please also note that creating virtual servers usually requires the server query admin accountĪnd that there is a limit to how many virtual servers can be created, which is dependent on your license. The server will test for the first unused UDP port. If VirtualServerProperty.VIRTUALSERVER_PORT is not specified in the virtual server properties, This can be turned off on the TS3 server, though. The virtual server is also automatically started. addChannelClientPermission public void addChannelClientPermission(int channelId,Ĭreates a new virtual server with the given name and returns an object containing the ID of the newlyĬreated virtual server, the default server admin token and the virtual server's voice port.0 equals a permanent ban reason - the reason for the ban, can be null Returns: the ID of the newly created ban entry Throws: TS3CommandFailedException - if the execution of a command fails See Also: RegEx Pattern,Ĭlient.getIp() Number of query commands sent: 1 Parameters: ip - a RegEx pattern to match a client's IP against, can be null name - a RegEx pattern to match a client's name against, can be null uid - the unique identifier of a client, can be null myTSId - the "myTeamSpeak" ID of a client, the string "empty", or null timeInSeconds - the duration of the ban in seconds. Note that creating a ban entry for the "empty" "myTeamSpeak" ID will ban all clients whoĭon't have a linked "myTeamSpeak" account. Returns the ID of the newly created ban entry. At least one of the parameters ip, name, uid, or See Also: The asynchronous version of the APIĪdds a new ban entry. To do so, call either selectVirtualServerByPort(int) or selectVirtualServerById(int).īe aware that many methods in this class will return null or -1 if a command fails. Make sure to either pass your login credentials to the TS3Config object whenĬreating the TS3Query or to call login(String, String) to log in.Īfter that, most commands also require you to select a virtual server. You won't be able to execute most commands while you're not logged in due to missing permissions. If a command takes longer than 4 seconds to complete, a TS3ConnectionFailedException Sends them to the TeamSpeak3 server, processes the response and returns the result.Īll methods in this class are synchronous, so they will block until the response arrives.Ĭalls to this API will usually take about 50 milliseconds to complete (plus ping), This class is used to easily interact with a TS3Query. API to interact with the TS3Query synchronously.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |