These are chat archives for TheHolyWaffle/TeamSpeak-3-Java-API

29th
Jan 2017
JenkePlays
@JenkePlays_twitter
Jan 29 2017 11:07
I become a Error: Exception in thread "[TeamSpeak-3-Java-API] SocketWriter" java.lang.NullPointerException
at com.github.theholywaffle.teamspeak3.commands.CommandEncoding.encode(CommandEncoding.java:34)
at com.github.theholywaffle.teamspeak3.commands.parameter.KeyValueParam.build(KeyValueParam.java:55)
at com.github.theholywaffle.teamspeak3.commands.parameter.Parameter.toString(Parameter.java:35)
at java.lang.String.valueOf(String.java:2994)
at java.lang.StringBuilder.append(StringBuilder.java:131)
at com.github.theholywaffle.teamspeak3.commands.Command.toString(Command.java:120)
at com.github.theholywaffle.teamspeak3.SocketWriter.run(SocketWriter.java:58)
Does anyone know why this is ?
Roger Baumgartner
@rogermb
Jan 29 2017 11:08
One of your arguments to an API call was null
JenkePlays
@JenkePlays_twitter
Jan 29 2017 11:08
                        api.editChannel(36, Collections.singletonMap(ChannelProperty.CHANNEL_PASSWORD, null));
Is this the Error ?
Roger Baumgartner
@rogermb
Jan 29 2017 11:09
Yeah
Why would you do this??
JenkePlays
@JenkePlays_twitter
Jan 29 2017 11:09
I will set the Password off.
How can i set the password off =
Roger Baumgartner
@rogermb
Jan 29 2017 11:10
""
If the empty string doesn't work, you most likely can't change the password from a server query anyways
JenkePlays
@JenkePlays_twitter
Jan 29 2017 11:10
ohhh, iam stupid :D
JenkePlays
@JenkePlays_twitter
Jan 29 2017 11:24
How can i get the idle time of a player ?
OVer the Clientinfo ?
Roger Baumgartner
@rogermb
Jan 29 2017 11:26
Dude, you're really starting to stretch it. I'm not your personal "google" - use your own brain.
If you're using an IDE, type "idle" and look for any suggestions. If you don't have an IDE, open the file ClientInfo.java and use a search function to look for "idle"
JenkePlays
@JenkePlays_twitter
Jan 29 2017 11:26
Thx
Henny022
@Henny022
Jan 29 2017 12:09
if you want to work with command args, this is a very nice solution
´´´String args[] = message.split(" ");´´´
String args[] = message.split(" ");
kreidlerflorett
@kreidlerflorett
Jan 29 2017 19:30

@rogermb

This wouldn't happen if the API just set overwrite=1 instead of 0. However, I was (probably being overly cautious) afraid of a CRC32 hash collision happening. Basically, I wanted to exclude the possibility of people uploading an icon to the TS3 server which didn't already exist on there and it removing / changing an existing icon to that uploaded icon. At least this way you know that a "collision" has happened and can take the appropriate steps to resolve it

Hmmm, I have sometime problems with the CRC32. How do you mean that with overwrite=1?

How could I do that?
Roger Baumgartner
@rogermb
Jan 29 2017 19:37
If you get a collision, you're most likely trying to upload the same icon twice.
Overwriting is in almost every situation the wrong response