public class SourceServer extends Object
SourceServer class.
Constructor and Description |
---|
SourceServer() |
Modifier and Type | Method and Description |
---|---|
InetSocketAddress |
getAddress()
The address of the connection to the server
|
int |
getAppId()
The App ID of the game
|
String |
getGameDescription()
Full name of the game
|
String |
getGameDirectory()
The name of the folder containing the game files
|
long |
getGameId()
The server's 64-bit game id
|
int |
getGamePort()
The game port of the server
|
String |
getGameVersion()
The version of the game installed on the server
|
String |
getHostAddress()
The IP address of the server.
|
String |
getMapName()
The name of the map currently loaded by the server
|
int |
getMaxPlayers()
The maximum number of players supported by the server
|
String |
getName()
The name of the server
|
byte |
getNetworkVersion()
Protocol version used by the server
|
int |
getNumOfBots()
The number of bots on the server
|
int |
getNumOfPlayers()
The number of players on the server
|
String |
getOperatingSystem()
The operating system of the server (l = linux, w = windows, m = mac)
|
int |
getPort()
The query port of the server.
|
long |
getServerId()
The server's 64-bit steam id
|
String |
getServerTags()
Tags that describe the game according to the server
|
String |
getTvName()
Source TV name
|
int |
getTvPort()
Source TV Port
|
boolean |
isDedicated()
Specified whether the server is dedicated or not
|
boolean |
isPasswordProtected()
Deprecated.
|
boolean |
isPrivateServer()
Specifies if the server is a private server and password protected
|
boolean |
isSecure()
Specifies whether the server uses VAC
|
boolean |
isSourceTvProxy()
Specifies whether the server is a Source TV proxy/relay
|
void |
setAddress(InetSocketAddress address)
Setter for the field
address . |
void |
setAppId(int appId)
Setter for the field
appId . |
void |
setDedicated(boolean dedicated)
Setter for the field
dedicated . |
void |
setGameDescription(String gameDescription)
Setter for the field
gameDescription . |
void |
setGameDirectory(String gameDirectory)
Setter for the field
gameDirectory . |
void |
setGameId(long gameId)
Setter for the field
gameId . |
void |
setGamePort(int gamePort) |
void |
setGameVersion(String gameVersion)
Setter for the field
gameVersion . |
void |
setMapName(String mapName)
Setter for the field
mapName . |
void |
setMaxPlayers(int maxPlayers)
Setter for the field
maxPlayers . |
void |
setName(String name)
Setter for the field
name . |
void |
setNetworkVersion(byte networkVersion)
Setter for the field
networkVersion . |
void |
setNumOfBots(int numOfBots)
Setter for the field
numOfBots . |
void |
setNumOfPlayers(int numOfPlayers)
Setter for the field
numOfPlayers . |
void |
setOperatingSystem(String operatingSystem)
Setter for the field
operatingSystem . |
void |
setPasswordProtected(boolean passwordProtected)
Deprecated.
|
void |
setPrivateServer(boolean privateServer)
Setter for the field
privateServer . |
void |
setSecure(boolean secure)
Setter for the field
secure . |
void |
setServerId(long serverId)
Setter for the field
serverId . |
void |
setServerTags(String serverTags)
Setter for the field
serverTags . |
void |
setSourceTvProxy(boolean sourceTvProxy) |
void |
setTvName(String tvName)
Setter for the field
tvName . |
void |
setTvPort(int tvPort)
The Source TV port
|
public boolean isPrivateServer()
Specifies if the server is a private server and password protected
true
if the server is a private server and requires a password. otherwise false
if the server is public.public void setPrivateServer(boolean privateServer)
Setter for the field privateServer
.
privateServer
- a booleanpublic byte getNetworkVersion()
Protocol version used by the server
public void setNetworkVersion(byte networkVersion)
Setter for the field networkVersion
.
networkVersion
- a bytepublic String getMapName()
The name of the map currently loaded by the server
public void setMapName(String mapName)
Setter for the field mapName
.
mapName
- a String
objectpublic String getGameDirectory()
The name of the folder containing the game files
String
objectpublic void setGameDirectory(String gameDirectory)
Setter for the field gameDirectory
.
gameDirectory
- a String
objectpublic String getGameDescription()
Full name of the game
public void setGameDescription(String gameDescription)
Setter for the field gameDescription
.
gameDescription
- a String
objectpublic int getAppId()
The App ID of the game
public void setAppId(int appId)
Setter for the field appId
.
appId
- a intpublic int getNumOfPlayers()
The number of players on the server
public void setNumOfPlayers(int numOfPlayers)
Setter for the field numOfPlayers
.
numOfPlayers
- a intpublic int getMaxPlayers()
The maximum number of players supported by the server
public void setMaxPlayers(int maxPlayers)
Setter for the field maxPlayers
.
maxPlayers
- a intpublic int getNumOfBots()
The number of bots on the server
public void setNumOfBots(int numOfBots)
Setter for the field numOfBots
.
numOfBots
- a intpublic boolean isDedicated()
Specified whether the server is dedicated or not
true
if the server is dedicated, otherwise false
if it is non-dedicated OR a source tv proxyisSourceTvProxy()
public void setDedicated(boolean dedicated)
Setter for the field dedicated
.
dedicated
- a booleanpublic String getOperatingSystem()
The operating system of the server (l = linux, w = windows, m = mac)
public void setOperatingSystem(String operatingSystem)
Setter for the field operatingSystem
.
operatingSystem
- a String
object@Deprecated @ApiStatus.ScheduledForRemoval public boolean isPasswordProtected()
isPrivateServer()
Specifies if the server is password
@Deprecated @ApiStatus.ScheduledForRemoval public void setPasswordProtected(boolean passwordProtected)
setPrivateServer(boolean)
Setter for the field passwordProtected
.
passwordProtected
- a booleanpublic boolean isSecure()
Specifies whether the server uses VAC
true
if the server has VAC enabled.public void setSecure(boolean secure)
Setter for the field secure
.
secure
- a booleanpublic String getGameVersion()
The version of the game installed on the server
String
objectpublic void setGameVersion(String gameVersion)
Setter for the field gameVersion
.
gameVersion
- a String
objectpublic long getServerId()
The server's 64-bit steam id
public void setServerId(long serverId)
Setter for the field serverId
.
serverId
- a longpublic int getTvPort()
Source TV Port
public void setTvPort(int tvPort)
The Source TV port
tvPort
- The Source TV port number of the serverpublic String getTvName()
Source TV name
public void setTvName(String tvName)
Setter for the field tvName
.
tvName
- a String
objectpublic String getServerTags()
Tags that describe the game according to the server
public void setServerTags(String serverTags)
Setter for the field serverTags
.
serverTags
- a String
objectpublic long getGameId()
The server's 64-bit game id
public void setGameId(long gameId)
Setter for the field gameId
.
gameId
- a longpublic void setName(String name)
Setter for the field name
.
name
- a String
objectpublic InetSocketAddress getAddress()
The address of the connection to the server
InetSocketAddress
containing the host and query port of the serverpublic void setAddress(InetSocketAddress address)
Setter for the field address
.
address
- a InetSocketAddress
objectpublic String getHostAddress()
The IP address of the server. This is similar to calling getAddress().getHostAddress()
String
representing the host address of the serverpublic int getPort()
The query port of the server. This is similar to calling getAddress().getPort()
.
Note: For most servers, the query and game ports are usually the same. If this is not the case and you need to get the actual game port number of the server, use getGamePort()
getGamePort()
public int getGamePort()
The game port of the server
public void setGamePort(int gamePort)
public boolean isSourceTvProxy()
true
if the server is a Source TV proxypublic void setSourceTvProxy(boolean sourceTvProxy)
Copyright © 2016–2024. All rights reserved.