Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 13 21:03
    rogermb commented #342
  • Oct 13 21:01
    DanielAlves123 commented #342
  • Oct 13 20:55
    DanielAlves123 closed #342
  • Oct 13 20:55
    DanielAlves123 commented #342
  • Oct 13 17:17
    rogermb commented #342
  • Oct 13 17:17
    rogermb labeled #342
  • Oct 13 11:52
    DanielAlves123 opened #342
  • Oct 09 11:39
    mnjg123 closed #305
  • Sep 14 21:26
    rogermb commented #339
  • Sep 14 21:24
    sgebauer commented #339
  • Sep 14 20:11
    rogermb commented #339
  • Sep 14 20:07
    sgebauer commented #339
  • Aug 31 12:36
    rogermb commented #341
  • Aug 31 12:35
    NewJavaDeveloper closed #341
  • Aug 31 12:35
    NewJavaDeveloper commented #341
  • Aug 31 12:05
    rogermb commented #341
  • Aug 31 12:03
    rogermb commented #341
  • Aug 31 11:45
    NewJavaDeveloper edited #341
  • Aug 31 11:44
    NewJavaDeveloper opened #341
  • Aug 16 15:31
    akaJonas opened #340
Henny022
@Henny022
glad its solved
astrolamb-gaming
@astrolamb-gaming
for events, specifically onClientJoin(), is there a difference between getInvokerUniqueId() and getUniqueClientIdentifier()?
astrolamb-gaming
@astrolamb-gaming
Ah, thanks!
Henny022
@Henny022
no probleom
JenkePlays
@JenkePlays_twitter
Hey, How can I get the clientUID in the ClientLeaveEvent?
Roger Baumgartner
@rogermb
You can't. TS3 only sends you the client ID
JenkePlays
@JenkePlays_twitter
Also it doesnt work?
Roger Baumgartner
@rogermb
You'll have to save a client's UId, for example in a (Hash)Map that maps from client ID to UId

Also it doesnt work?

What doesn't work?

JenkePlays
@JenkePlays_twitter
To get the clientUID
I have tried this:
Client c = api.getClientInfo(e.getClientId());
Roger Baumgartner
@rogermb
Think about what you're trying to do
getClientInfo only works on clients that are online
When you get a ClientLeaveEvent, the client has left the server
JenkePlays
@JenkePlays_twitter
Thank you its works :D
astrolamb-gaming
@astrolamb-gaming
Is there a way to get the root channel of a sub-channel?
Roger Baumgartner
@rogermb
@astrolamb-gaming I think you're looking for Channel(Info)#getParentChannelId
JenkePlays
@JenkePlays_twitter
Can I set the Output of the API in a Text Document?
Roger Baumgartner
@rogermb
Yes! Either use a different logging provider, or for a much simpler solution, create your own config file for the bundled SLF4J-Simple logger. You could create a copy of the logging config file we use and then set org.slf4j.simpleLogger.logFile to your desired file name
JenkePlays
@JenkePlays_twitter
File file = new File("logs/System.log");
try {
System.setOut(new PrintStream(new FileOutputStream(file,true)));
} catch (FileNotFoundException e) {
e.printStackTrace();
}
I have make this but the Problem is it is only in the Text Document and not in the Console and the text Document.
Roger Baumgartner
@rogermb
Use a better logging implementation, then. Seriously, messing around with System.out will break stuff
Get the API Jar without a bundled logging provider and use log4j2 or logback as the logging implementation
And write your own little config file that defines two appenders: one to the console, the other to a file
JenkePlays
@JenkePlays_twitter
I have try this: log4j2 but iam too stupid to use it.
Roger Baumgartner
@rogermb
Read the tutorial, crawl stackoverflow :stuck_out_tongue:
astrolamb-gaming
@astrolamb-gaming
Will Channel(Info)#getParentChannelIdget the root channel, or the immediate parent?
Roger Baumgartner
@rogermb
The immediate parent. Was that what you were asking for?
astrolamb-gaming
@astrolamb-gaming
If a channel has a child which has a child which has a child, I want to do things for all channels depending on if the channel is a child (or grandchild, etc) of the first channel.
So, not exactly :P
Roger Baumgartner
@rogermb
No, there isn't a built-in way to do this. Your best bet would be to just do a getChannels() and do the number crunching yourself
I don't know what your requirements are, so it's hard to say what the best approach would be.
astrolamb-gaming
@astrolamb-gaming
So if the channel is the root channel, will Channel(Info)#getParentChannelId return null?
Roger Baumgartner
@rogermb
It'll probably be -1
And if it isn't that, it'll be 0 :stuck_out_tongue:
astrolamb-gaming
@astrolamb-gaming
New question: is there a way to set a channel icon? Channel#getIconId() is function but I haven't found a setIconId.
Roger Baumgartner
@rogermb
Sure! Icon IDs are set via the permissions API
Because TS3
So you'll need the addChannelPermission method
My bad, it's "add", not "set"
astrolamb-gaming
@astrolamb-gaming
How do you find specific permission types?
Roger Baumgartner
@rogermb
There's a list in the TS3 client, for one
astrolamb-gaming
@astrolamb-gaming
Ah, thanks lol
Roger Baumgartner
@rogermb
I'm not sure if there's any other "official list of permissions"
Oh, and make sure that you set the permissions editor in the TS3 client to "advanced mode" or similar
Henny022
@Henny022
be sure to use the advanced permission view or however it is calles
Roger Baumgartner
@rogermb
Ha-haaa! Didn't get sniped this time! :P
Henny022
@Henny022
why do we always write the same stuff
Roger Baumgartner
@rogermb
Because we're both problem solvers, looking for the next problem in need of a solution, I suppose :)
Henny022
@Henny022
or because its midnight and i have nothing better to do, than sitting in this gitter channel and wait fpr someone to write something