VRage.Game.ModAPI
IMyPlayer
Assembly: VRage.Game.dll
public interface IMyPlayer
Events
| Member | Description |
|---|---|
| IdentityChanged | Event triggered when the player's identity changed (eg. died w/permadeath on) |
Properties
| Member | Description |
|---|---|
| BuildColorSlots | Gets or sets all the player's build color slots |
| Character | Gets the Character entity for the player. |
| Client | Gets network client for this player. Used for sending network messages between players and server |
| Controller | Gets the EntityController for the player. |
| DefaultBuildColorSlots | Gets the list of the default build colors. |
| DisplayName | Visible player name |
| Grids | List of grids where the player owns at least one block. |
| Identity | Gets the identity for the player |
| IdentityId | Unique id for the current player identity. |
| IsBot | Gets if the player is a bot (non-human) |
| PromoteLevel | Gets the player's promote level |
| RespawnShip | Gets the entity id for the player's respawn ship(s). |
| SelectedBuildColor | Gets or sets the build color for the selected slot. |
| SelectedBuildColorSlot | Gets or sets the selected slot for the build color. |
| SteamUserId | Gets the Steam user id for the player. |
| IsAdmin | Obsolete: Use Promote Level instead Gets if the player is an admin on the server. |
| IsPromoted | Obsolete: Use Promote Level instead Gets if the player is promoted to Space Master. |
| PlayerID | Obsolete: Use IdentityId instead. |
Methods
| Member | Description |
|---|---|
| AddGrid(long) | Adds a grid to the player's Grids list. |
| ChangeOrSwitchToColor(Vector3) | Switches to slot containing color, if present. Otherwise sets active slot to color. |
| GetBalanceShortString() | Gets balance of an account associated with player. Format is 'BALANCE CURRENCYSHORTNAME'. |
| GetPosition() | Gets the position of controlled entity. Grid/Character |
| GetRelationTo(long) | Gets the relationship between this player and another. |
| RemoveGrid(long) | Removes a grid from the player's Grids list. |
| RequestChangeBalance(long) | Changes the balance of the account of this player by given amount. Sends a message to server with the request. |
| SetDefaultColors() | Sets build colors back to defaults. |
| SpawnAt(MatrixD, Vector3, IMyEntity, bool, string, Color?) | Spawns the player at a specific place. Must be called on server. |
| SpawnAt(MatrixD, Vector3, IMyEntity) | Spawns the player at a specific place. Must be called on server. |
| SpawnIntoCharacter(IMyCharacter) | Spawns the player as a new character (changes the model). |
| TryGetBalanceInfo(out long) | Gets balance of an account associated with player. |