TheHolyWaffle / TeamSpeak-3-Java-API

A Java wrapper of TeamSpeak's 3 server query API.
MIT License
306 stars 107 forks source link

Create Custom Events #338

Closed Jareczeq closed 4 years ago

Jareczeq commented 5 years ago

Hi! I'm trying to make my own events on TS3Api. Despite adding the appropriate classes and settings, this event does not work. I'm doing ServerGroupClientAddenEvent. I do not know what I'm doing anymore.

rogermb commented 5 years ago

Hi @Jareczeq

There's no way to create custom events just on the client side. You'd have to modify the TeamSpeak3 server itself to make it send you information about specific events.

Currently, there are no events for when clients are added to or removed from server groups.

One workaround you could try would be to use polling: Every 10 seconds or so, get a list of all clients, and compare the server groups that each of the clients is a member of. If the list of server groups differ, call some event handling method 😄