TeamSpeak-3-Java-API
TeamSpeak-3-Java-API copied to clipboard
Send private message not working on newest ts
Issues on Github are (mostly) meant for bug reporting and feature requests. For basic questions, please use our Gitter instead.
For bug reports, please include the debug log without any private information (login, etc.) by enabling communications logging and ensuring that
DEBUG
messages are being logged (enabled if you use the jar file, see here if you use Maven).
If i will send a player a private message with that code getTsapi().sendPrivateMessage(e.getClientId(), "Why you will not work");
the message is sendet. but if i try it again the teamspeeak says "Error: Invalid Client" and i must create a new query login to get this to work again. It i not possible to send more than one private message.
Can you provide the code that is causing the issue?
I have already provided the code getTsapi().sendPrivateMessage(e.getClientId(), "Why you will not work");
e is the Join Event
Can you provide me with the whole class in which you initialize the API? I honestly don't know what's causing the issue here as the method you are using definitely works fine for me. The only thing that could be causing it is an incorrect API setup.
I can't really help you without seeing more of your code, and given the age of this issue, you probably either already solved it yourself.
But just in case: When sending messages, make sure you're not trying to send a message to a query client. Use Client#isRegularClient()
to ensure it's a normal client you're trying to send a message to.