TeamSpeak-3-Java-API
TeamSpeak-3-Java-API copied to clipboard
Missing function.
Missing something like: client.getConnectionDuration() to check how long hes connected to the server :) Would be nice for leecher kicking etc.
There's Client.getLastConnectedDate(), which despite the somewhat confusing name means the date & time the current connection to the server started (so subtract that date from now), there's Client.getIdleTime(), which measures the client's inactivity in milliseconds, and there's also ClientInfo.getTimeConnected(), which allows you to skip the manual duration calculation if you already have a ClientInfo object 😄
How 2 create a channel with the same rights as the parent channel?
final Map<ChannelProperty, String> properties = new HashMap<>(); properties.put(ChannelProperty.CHANNEL_FLAG_TEMPORARY, "1"); properties.put(ChannelProperty.CPID, String.valueOf(e.getTargetChannelId())); properties.put(ChannelProperty.CHANNEL_CODEC_QUALITY, "10"); api.createChannel(channelName, properties); api.moveClient(client.getId(), api.getChannelByNameExact(channelName, true).getId()); api.moveClient(api.whoAmI().getId(), api.getServerInfo().getDefaultChannelGroup());
i want to sync rights with parent channel 👍
@Backxtar you could make a copy of the parent channel's ChannelProperty map and change the values you want to be different.