TeamSpeak-3-Java-API icon indicating copy to clipboard operation
TeamSpeak-3-Java-API copied to clipboard

clientInfo error?

Open Backxtar opened this issue 2 years ago • 2 comments

i have this error:

`com.github.theholywaffle.teamspeak3.api.exception.TS3CommandFailedException: A "clientinfo" command returned with a server error.

invalid clientID (ID 512) at com.github.theholywaffle.teamspeak3.api.CommandFuture.checkForFailure(CommandFuture.java:416) at com.github.theholywaffle.teamspeak3.api.CommandFuture.getUninterruptibly(CommandFuture.java:357) at com.github.theholywaffle.teamspeak3.TS3Api.getClientInfo(TS3Api.java:2027) at de.backxtar.managers.EventManager$1.onClientJoin(EventManager.java:44) at com.github.theholywaffle.teamspeak3.api.event.ClientJoinEvent.fire(ClientJoinEvent.java:176) at com.github.theholywaffle.teamspeak3.EventManager$ListenerTask.run(EventManager.java:150) at com.github.theholywaffle.teamspeak3.TS3Query.lambda$submitUserTask$0(TS3Query.java:282) at com.github.theholywaffle.teamspeak3.TS3Query$$Lambda$41/0x0000000000000000.run(Unknown Source) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:823) `

This is the code:

@Override
            public void onClientJoin(ClientJoinEvent clientJoinEvent) {
                try {
                    ClientInfo clientInfo = api.getClientInfo(clientJoinEvent.getClientId());
                    if (clientInfo.isServerQueryClient()) return;
                    Utils.changeInfo();
                    OnClientJoin.sendWelcome(clientJoinEvent);
                    OnClientJoin.gw2ApiReminder(clientJoinEvent);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }

Backxtar avatar Sep 26 '21 18:09 Backxtar

why does this throws exceptions??

Backxtar avatar Sep 26 '21 18:09 Backxtar

I recall having a similar issue; try using clientJoinEvent.getInvokerId() instead.

astrolamb-gaming avatar Nov 23 '21 12:11 astrolamb-gaming