OpenMod Docs OpenMod Docs
OpenMod Docs OpenMod Docs
OpenMod .NET Plugin Framework.

Class RustPlayer

Inheritance
System.Object
RustEntity
RustPlayer
Implements
IDamageSource
IPlayer
IEntity
IGameObject
IComparable<RustPlayer>
IHasInventory
IHasHealth
IHasThirst
IHasHunger
Inherited Members
RustEntity.Entity
RustEntity.Transform
RustEntity.State
RustEntity.EntityInstanceId
RustEntity.SetPositionAsync(Vector3)
RustEntity.SetPositionAsync(Vector3, Quaternion)
RustEntity.DamageSourceName
Namespace: OpenMod.Rust.Players
Assembly: OpenMod.Rust.dll
Syntax
public class RustPlayer : RustEntity, IDamageSource, IPlayer, IEntity, IGameObject, IComparable<RustPlayer>, IHasInventory, IHasHealth, IHasThirst, IHasHunger

Constructors

| Improve this Doc View Source

RustPlayer(BasePlayer)

Declaration
public RustPlayer(BasePlayer player)
Parameters
Type Name Description
BasePlayer player

Properties

| Improve this Doc View Source

Address

Declaration
public IPAddress? Address { get; }
Property Value
Type Description
System.Nullable<IPAddress>
| Improve this Doc View Source

Asset

Declaration
public override IEntityAsset Asset { get; }
Property Value
Type Description
IEntityAsset
Overrides
RustEntity.Asset
| Improve this Doc View Source

Health

Declaration
public double Health { get; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

Hunger

Declaration
public double Hunger { get; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

Inventory

Declaration
public IInventory Inventory { get; }
Property Value
Type Description
IInventory
| Improve this Doc View Source

IsAlive

Declaration
public bool IsAlive { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

MaxHealth

Declaration
public double MaxHealth { get; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

MaxHunger

Declaration
public double MaxHunger { get; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

MaxThirst

Declaration
public double MaxThirst { get; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

Player

Declaration
public BasePlayer Player { get; }
Property Value
Type Description
BasePlayer
| Improve this Doc View Source

PlayerMetabolism

Declaration
public PlayerMetabolism PlayerMetabolism { get; }
Property Value
Type Description
PlayerMetabolism
| Improve this Doc View Source

Stance

Declaration
public string Stance { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Thirst

Declaration
public double Thirst { get; }
Property Value
Type Description
System.Double

Methods

| Improve this Doc View Source

CompareTo(RustPlayer)

Declaration
public int CompareTo(RustPlayer other)
Parameters
Type Name Description
RustPlayer other
Returns
Type Description
System.Int32
| Improve this Doc View Source

DamageAsync(Double)

Declaration
public Task DamageAsync(double amount)
Parameters
Type Name Description
System.Double amount
Returns
Type Description
Task
| Improve this Doc View Source

DoTeleport(Vector3, Quaternion)

Declaration
protected override bool DoTeleport(Vector3 destination, Quaternion rotation)
Parameters
Type Name Description
Vector3 destination
Quaternion rotation
Returns
Type Description
System.Boolean
Overrides
RustEntity.DoTeleport(Vector3, Quaternion)
| Improve this Doc View Source

KillAsync()

Declaration
public Task KillAsync()
Returns
Type Description
Task
| Improve this Doc View Source

SetFullHealthAsync()

Declaration
public Task SetFullHealthAsync()
Returns
Type Description
Task
| Improve this Doc View Source

SetHealthAsync(Double)

Declaration
public Task SetHealthAsync(double health)
Parameters
Type Name Description
System.Double health
Returns
Type Description
Task
| Improve this Doc View Source

SetHungerAsync(Double)

Declaration
public Task SetHungerAsync(double hunger)
Parameters
Type Name Description
System.Double hunger
Returns
Type Description
Task
| Improve this Doc View Source

SetThirstAsync(Double)

Declaration
public Task SetThirstAsync(double thirst)
Parameters
Type Name Description
System.Double thirst
Returns
Type Description
Task

Implements

IDamageSource
IPlayer
IEntity
IGameObject
IComparable<>
IHasInventory
IHasHealth
IHasThirst
IHasHunger

Extension Methods

DisposeHelper.DisposeSyncOrAsync(Object)