{"id":15009231,"url":"https://github.com/theholywaffle/teamspeak-3-java-api","last_synced_at":"2025-04-04T06:09:45.142Z","repository":{"id":12157679,"uuid":"14752173","full_name":"TheHolyWaffle/TeamSpeak-3-Java-API","owner":"TheHolyWaffle","description":"A Java wrapper of TeamSpeak's 3 server query API.","archived":false,"fork":false,"pushed_at":"2024-04-07T21:10:42.000Z","size":87742,"stargazers_count":310,"open_issues_count":38,"forks_count":107,"subscribers_count":24,"default_branch":"master","last_synced_at":"2025-04-04T05:59:50.303Z","etag":null,"topics":["java","maven","teamspeak","teamspeak3"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheHolyWaffle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2013-11-27T16:19:16.000Z","updated_at":"2025-01-24T10:35:24.000Z","dependencies_parsed_at":"2024-04-07T22:23:21.708Z","dependency_job_id":"45277567-ef85-446f-9b06-6191ebaea3cd","html_url":"https://github.com/TheHolyWaffle/TeamSpeak-3-Java-API","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheHolyWaffle%2FTeamSpeak-3-Java-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheHolyWaffle%2FTeamSpeak-3-Java-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheHolyWaffle%2FTeamSpeak-3-Java-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheHolyWaffle%2FTeamSpeak-3-Java-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheHolyWaffle","download_url":"https://codeload.github.com/TheHolyWaffle/TeamSpeak-3-Java-API/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247128753,"owners_count":20888235,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","maven","teamspeak","teamspeak3"],"created_at":"2024-09-24T19:23:53.575Z","updated_at":"2025-04-04T06:09:45.119Z","avatar_url":"https://github.com/TheHolyWaffle.png","language":"Java","readme":"TeamSpeak 3 Java API\n====================\n[![Build Status](https://github.com/TheHolyWaffle/TeamSpeak-3-Java-API/actions/workflows/maven.yml/badge.svg?branch=master)](https://github.com/TheHolyWaffle/TeamSpeak-3-Java-API/actions/workflows/maven.yml) [![Maven Central](https://img.shields.io/maven-central/v/com.github.theholywaffle/teamspeak3-api.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.github.theholywaffle%22%20a%3A%22teamspeak3-api%22) [![Javadocs](http://www.javadoc.io/badge/com.github.theholywaffle/teamspeak3-api.svg)](http://www.javadoc.io/doc/com.github.theholywaffle/teamspeak3-api) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/TheHolyWaffle/TeamSpeak-3-Java-API?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n\nA Java wrapper of the [TeamSpeak 3](http://media.teamspeak.com/ts3_literature/TeamSpeak%203%20Server%20Query%20Manual.pdf)  Server Query API\n\n## Features\n\n- Contains almost all server query functionality! (see [TeamSpeak 3 Server Query Manual](https://www.teamspeak-info.de/downloads/ts3_serverquery_manual.pdf))\n- Built-in keep alive method\n- Threaded event-based system\n- Both [synchronous](src/main/java/com/github/theholywaffle/teamspeak3/TS3Api.java) and [asynchronous](src/main/java/com/github/theholywaffle/teamspeak3/TS3ApiAsync.java) implementations available\n- Can be set up to reconnect and automatically resume execution after a connection problem\n- Utilizes [SLF4J](https://www.slf4j.org/) for logging abstraction and integrates with your logging configuration\n\n## Getting Started\n\n### Download\n\n- **Option 1 (Standalone Jar)**: \n\n    Download the [latest release](https://search.maven.org/remote_content?g=com.github.theholywaffle\u0026a=teamspeak3-api\u0026v=LATEST\u0026c=with-dependencies) and add this jar to the buildpath of your project.\n\n- **Option 2 (Maven)**: \n\n    Add the following to your pom.xml:\n\n    ```xml\n    \u003cdependency\u003e\n\t    \u003cgroupId\u003ecom.github.theholywaffle\u003c/groupId\u003e\n\t    \u003cartifactId\u003eteamspeak3-api\u003c/artifactId\u003e\n\t    \u003cversion\u003e...\u003c/version\u003e\n    \u003c/dependency\u003e\n    ```\n\n    This API utilizes [SLF4J](https://www.slf4j.org/) for logging purposes and doesn't come shipped with a default logging implementation, if you use Maven instead of the standalone jar.\n    You will manually have to add one via Maven to get any logging going, if you don't have one already. \n    \n    The easiest way to do so is to just add SimpleLogger to your project, which also supports configuration via\n    config file (needs to be shipped as a resource with your jar), if you want to log ```DEBUG``` messages for instance (e.g. raw client-server communication). \n\n    See this [configuration example](https://github.com/TheHolyWaffle/TeamSpeak-3-Java-API/blob/master/src/main/resources/simplelogger.properties) for SimpleLogger.\n    Add the following to your pom.xml to get started:\n\n    ```xml\n    \u003cdependency\u003e\n      \u003cgroupId\u003eorg.slf4j\u003c/groupId\u003e\n      \u003cartifactId\u003eslf4j-simple\u003c/artifactId\u003e\n      \u003cversion\u003e1.7.25\u003c/version\u003e\n    \u003c/dependency\u003e\n    ```\n\n    You can however choose whichever logging framework suits your needs best. Just add your logging framework and the\n    corresponding [binding](https://mvnrepository.com/artifact/org.slf4j) to your pom.xml.\n\n### Usage\n\nAll functionality is contained in the [TS3Api](src/main/java/com/github/theholywaffle/teamspeak3/TS3Api.java) object.\n\n1. Create a [TS3Config](src/main/java/com/github/theholywaffle/teamspeak3/TS3Config.java) object and customize it.\n2. Create a [TS3Query](src/main/java/com/github/theholywaffle/teamspeak3/TS3Query.java) object with your TS3Config as argument.\n3. Call `TS3Query#connect()` to connect to the server.\n4. Call `TS3Query#getApi()` to get an [TS3Api](src/main/java/com/github/theholywaffle/teamspeak3/TS3Api.java) object.\n5. Do whatever you want with this api :)\n\n\n### Example\n\n```java\nfinal TS3Config config = new TS3Config();\nconfig.setHost(\"77.77.77.77\");\n\nfinal TS3Query query = new TS3Query(config);\nquery.connect();\n\nfinal TS3Api api = query.getApi();\napi.login(\"serveradmin\", \"serveradminpassword\");\napi.selectVirtualServerById(1);\napi.setNickname(\"PutPutBot\");\napi.sendChannelMessage(\"PutPutBot is online!\");\n...\n```\n\n### More examples\n\n[here](example)\n\n## Extra notes\n\n### FloodRate\n\nOnly use `FloodRate.UNLIMITED` if you are sure that your query account is whitelisted (query_ip_whitelist.txt in Teamspeak server folder). If not, use `FloodRate.DEFAULT`. The server will temporarily ban your account if you send too many commands in a short period of time. For more info on this, check the [TeamSpeak 3 Server Query Manual, page 6](http://media.teamspeak.com/ts3_literature/TeamSpeak%203%20Server%20Query%20Manual.pdf#page=6).\n\n### TS3Config Settings\n\n| Option | Description | Method signature | Default value | Required |\n| --- | --- | --- | :---: | :---: |\n|Host/IP | IP/Host of TeamSpeak 3 server.| ``setHost(String)`` |  | yes |\n|QueryPort | Query port of TeamSpeak 3 server. | ``setQueryPort(int)`` | 10011 | no |\n|FloodRate | Prevents possible spam to the server. | ``setFloodRate(FloodRate)`` | `FloodRate.DEFAULT` | no |\n|Communications logging | Log client-server communication. | ``setEnableCommunicationsLogging(boolean)`` | false | no |\n|Command timeout | Time until a command waiting for a response fails | ``setCommandTimeout(int)`` | 4000 (ms) | no |\n\n## Questions or bugs?\n\nPlease let us know [here](../../issues). We'll try to help you as soon as we can.\n\nIf you just have a simple question or want to talk to us about something else, please join the [repository chat](https://gitter.im/TheHolyWaffle/TeamSpeak-3-Java-API) on Gitter.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheholywaffle%2Fteamspeak-3-java-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheholywaffle%2Fteamspeak-3-java-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheholywaffle%2Fteamspeak-3-java-api/lists"}