public class ServerQueryInfo extends Wrapper
TS3Api.whoAmI()
and TS3ApiAsync.whoAmI()
.Constructor and Description |
---|
ServerQueryInfo(Map<String,String> map)
Creates a new
ServerQueryInfo from the information present in the provided map. |
Modifier and Type | Method and Description |
---|---|
int |
getChannelId()
Gets the ID of the channel the server query is currently in.
|
int |
getDatabaseId()
Gets the ID of the server query in the database.
|
int |
getId()
Gets the client ID of the server query.
|
String |
getLoginName()
Gets the username that was used when logging the query in (using a username-password combination).
|
String |
getNickname()
Gets the nickname currently used by the server query.
|
int |
getOriginServerId()
Gets the ID of the virtual server on which the server query login was created.
|
String |
getUniqueIdentifier()
Gets the unique identifier of the server query.
|
int |
getVirtualServerId()
Gets the ID of the currently selected virtual server.
|
int |
getVirtualServerPort()
Gets the port used by the currently selected virtual server.
|
VirtualServerStatus |
getVirtualServerStatus()
Gets the status of the currently selected virtual server.
|
String |
getVirtualServerUniqueIdentifier()
Gets the unique identifier of the currently selected virtual server.
|
public ServerQueryInfo(Map<String,String> map)
ServerQueryInfo
from the information present in the provided map.map
- the map containing the key-value pairs abstracted by this objectpublic int getChannelId()
public int getDatabaseId()
In case this server query account was created by a client, its database ID will be identical to the client's database ID.
public int getId()
public String getLoginName()
This username was set when creating the server query login and doesn't have to be related to
the client who created the server query login.
In case a server query is not logged in yet, this method will return an empty string.
TS3Api#login(username, password) - logging in server queries
public String getNickname()
username from ip:port
Nicknames are only assigned after a virtual server has been selected. Until then, this method will return an empty string.
public int getOriginServerId()
This method will return 0
(the ID of the template server) if a server query is
not logged in or using the serveradmin
login.
public String getUniqueIdentifier()
In case this server query account was created by a client, its unique ID will be identical to the client's unique ID.
public int getVirtualServerId()
If used on a non-commercial TeamSpeak instance which can only host 1 virtual server,
this ID will always be 1.
If no virtual server has been selected yet, this method will return 0
.
0
if none is selectedpublic int getVirtualServerPort()
If no virtual server has been selected yet, this method will return 0
.
0
if none is selectedpublic VirtualServerStatus getVirtualServerStatus()
If no virtual server has been selected yet, this method will return VirtualServerStatus.UNKNOWN
.
public String getVirtualServerUniqueIdentifier()
If no virtual server has been selected yet, this method will return an empty string.
Copyright © 2015. All rights reserved.