-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with ChannelProperty Set Channel Temporary #361
Comments
You cannot set Permanent and Temporary at the same time |
Set |
I already have tried this, too (as one can see above in my question). But regardless of just setting Temporary to "1" or setting other flags to "0" I get the same error |
Hi! Turns out that Instead, the way to make a channel temporary is to set both That is, change your code to HashMap<ChannelProperty, String> channeledit = new HashMap<>();
channeledit.put(ChannelProperty.CHANNEL_FLAG_PERMANENT, "0");
channeledit.put(ChannelProperty.CHANNEL_FLAG_SEMI_PERMANENT, "0");
Load.asyncapi.editChannel(channel, channeledit); and it should make the channel temporary. Keep in mind that a channel that is temporary and does not contain any clients will be deleted from the TS3 server. You may want to move the query into the channel you're editing using |
Hey, And yes, I know that the channel is going to be deleted if set to temporary and nobody is in there, this is exactly what I've had in mind while making this query |
Hmm... are you sure that your code to make the channel temporary gets executed? You could also turn on the query command logging to check what commands get sent to the server and what kinds of responses you get back. |
Hey there,
I'm having an issue with the ChannelProperty CHANNEL_FLAG_TEMPORARY.
What am I trying to do:
If a specified user lefts the teamspeak server the channel is supposed to become temporary. I tried this using:
channeledit.put(ChannelProperty.CHANNEL_FLAG_PERMANENT, "0"); channeledit.put(ChannelProperty.CHANNEL_FLAG_TEMPORARY, "1");
Even without setting Permanent to 0 or setting semi permanent to 0, too, nothing worked.
I just get this error:
What am I doing wrong?
My Code so far for the client leave event:
` public void onClientLeave(ClientLeaveEvent e) {
int clientid = e.getClientId();
if (online.containsKey(clientid)) {
The text was updated successfully, but these errors were encountered: