Package net.eternalclient.api.accessors
Class PlayerSettings
- java.lang.Object
-
- net.eternalclient.api.accessors.PlayerSettings
-
public class PlayerSettings extends java.lang.Object
Utility class that provides methods for retrieving and setting player settings in the game client.
-
-
Constructor Summary
Constructors Constructor Description PlayerSettings()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
getBitValue(int id)
Returns the value of a specific bit in the varbits array.static int
getConfig(int id)
Gets the configuration value for a given id.static int
getConfig(net.eternalclient.api.data.VarPlayer varPlayer)
Retrieves the configuration value for the specified VarPlayer.static int
getVarClientInt(int id)
Retrieves the integer value of a variable client based on the given ID.static int
getVarClientInt(net.eternalclient.api.data.VarClientInt varClientInt)
Returns the integer value from the VarClientInt object.static java.lang.String
getVarClientString(int id)
Retrieves the value of a specific variable from the client, given its ID.static java.lang.String
getVarClientString(net.eternalclient.api.data.VarClientStr varClientStr)
Retrieves a string representation of a VarClientStr object.static void
setVarClientInt(int id, int value)
Sets the value of a variable client integer.static void
setVarClientInt(net.eternalclient.api.data.VarClientInt varClientInt, int value)
Sets the value of a VarClientInt on the client thread.static void
setVarClientString(int id, java.lang.String value)
Sets the value of a client string variable with the given id.static void
setVarClientString(net.eternalclient.api.data.VarClientStr varClientStr, java.lang.String value)
Sets the value of a VarClientStr with the given index.
-
-
-
Method Detail
-
getBitValue
public static int getBitValue(int id)
Returns the value of a specific bit in the varbits array.- Parameters:
id
- the index of the bit- Returns:
- the value of the bit at the specified index, or 0 if the array is null or the index is out of bounds
-
getConfig
public static int getConfig(int id)
Gets the configuration value for a given id.- Parameters:
id
- the id of the configuration value- Returns:
- the configuration value if found, otherwise 0
-
getConfig
public static int getConfig(net.eternalclient.api.data.VarPlayer varPlayer)
Retrieves the configuration value for the specified VarPlayer.- Parameters:
varPlayer
- the VarPlayer object to get the configuration value for- Returns:
- the configuration value of the specified VarPlayer
-
getVarClientInt
public static int getVarClientInt(int id)
Retrieves the integer value of a variable client based on the given ID.- Parameters:
id
- the ID of the variable client- Returns:
- the integer value of the variable client, or 0 if not found or is not an integer
-
getVarClientInt
public static int getVarClientInt(net.eternalclient.api.data.VarClientInt varClientInt)
Returns the integer value from the VarClientInt object.- Parameters:
varClientInt
- the VarClientInt object to get the value from- Returns:
- the integer value from the VarClientInt object
-
setVarClientInt
public static void setVarClientInt(net.eternalclient.api.data.VarClientInt varClientInt, int value)
Sets the value of a VarClientInt on the client thread.- Parameters:
varClientInt
- the VarClientInt to set the value ofvalue
- the value to set
-
setVarClientInt
public static void setVarClientInt(int id, int value)
Sets the value of a variable client integer.- Parameters:
id
- the ID of the variable client integer to be setvalue
- the value to set the variable client integer to
-
getVarClientString
public static java.lang.String getVarClientString(int id)
Retrieves the value of a specific variable from the client, given its ID. Returns an empty string if the variable is not found or if its value is not of type String.- Parameters:
id
- the ID of the variable to retrieve- Returns:
- the String value of the variable, or an empty string if not found or not a String
-
getVarClientString
public static java.lang.String getVarClientString(net.eternalclient.api.data.VarClientStr varClientStr)
Retrieves a string representation of a VarClientStr object.- Parameters:
varClientStr
- the VarClientStr object to get the string representation from- Returns:
- a string representation of the VarClientStr object
-
setVarClientString
public static void setVarClientString(net.eternalclient.api.data.VarClientStr varClientStr, java.lang.String value)
Sets the value of a VarClientStr with the given index.- Parameters:
varClientStr
- the VarClientStr objectvalue
- the string value to be set
-
setVarClientString
public static void setVarClientString(int id, java.lang.String value)
Sets the value of a client string variable with the given id.- Parameters:
id
- the id of the client string variablevalue
- the value to be set
-
-