TheHolyWaffle / TeamSpeak-3-Java-API

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

Problem with creating temporary channels #355

Closed Kaspek2480 closed 11 months ago

Kaspek2480 commented 4 years ago

Hello, I have a problem with creating temporary channels using your TeamSpeak Query Wrapper. When I am trying to create temporary channel, I got an error but creating for example semi permanent or permanent channels works fine. Errors:

`ERROR 14961 --- [nio-8080-exec-3] o.a.c.c.C.[.[.[/].[disp2020-03-09 00:47atcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is com.github.theholywaffle.teamspeak3.api.exception.TS3CommandFailedException: A "channelcreate" command returned with a server error.

invalid channel flags (ID 775)] with root cause

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

invalid channel flags (ID 775) at com.github.theholywaffle.teamspeak3.api.CommandFuture.checkForFailure(CommandFuture.java:415) ~[teamspeak3-api-1.2.0.jar:na] at com.github.theholywaffle.teamspeak3.api.CommandFuture.get(CommandFuture.java:285) ~[teamspeak3-api-1.2.0.jar:na] at xyz.kaspek.websocket.minevoipsocket.utils.TsUtil.createChannel(TsUtil.java:30) ~[minevoipsocket-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT] at xyz.kaspek.websocket.minevoipsocket.controlers.TeamSpeakController.createChannelAndMove(TeamSpeakController.java:142) ~[minevoipsocket-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_201] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_201]`

My code: Map<ChannelProperty, String> map = new HashMap<>(); map.put(ChannelProperty.CHANNEL_NAME, "sth"); map.put(ChannelProperty.CHANNEL_FLAG_TEMPORARY, "1"); map.put(ChannelProperty.CHANNEL_PASSWORD, "something"); map.put(ChannelProperty.CPID, String.valueOf(Config.vcChannel.getId()));

TAXSET commented 4 years ago

Have you verified that the value set in map.put(ChannelProperty.CPID, String.valueOf(Config.vcChannel.getId()) is actually an integer? I looked through your code and can't find any other lines that might be causing your problem. I'll try to replicate your problem as soon as I'm at home.

rogermb commented 4 years ago

Hi @Kaspek2480! Sorry for taking so long to respond. Real life has been a bit busy 😅

You're not really giving me a lot to work with, but here's what I noticed: