localClient: Difference between revisions
Jump to navigation
Jump to search
m (Mex moved page LocalClient to localClient) |
No edit summary |
||
| Line 7: | Line 7: | ||
|returnTypes = Client | |returnTypes = Client | ||
|returnInfo = an object referencing the local client | |returnInfo = an object referencing the local client | ||
|exampleJSCS = addCommandHandler("name", (command, text) => | |||
{ | |||
message('Your username is: ' + localClient.name); | |||
}); | |||
}} | }} | ||
Latest revision as of 19:40, 15 June 2026
Variable Client Only
![]()
Online and Offline Read-Only
Available since Client 1.0.0
Client localClient
The localClient variable is used to get the local client object.
Value
| Client | An object referencing the local client. |
| readonly | This variable cannot be changed. |
Notes
There aren't any notes for this variable.
Examples
Example 1 - JavaScript - Client-Side:
addCommandHandler("name", (command, text) =>
{
message('Your username is: ' + localClient.name);
});
Compatibility
There isn't any compatibility information for this variable.
Related
Client Related
getClient
getClientFromPlayerElement
getClients
localClient
client.administrator
client.console
client.despawnPlayer
client.disconnect
client.game
client.gameVersion
client.getData
client.index
client.ip
client.name
client.ping
client.player
client.removeAllData
client.removeData
client.setData