Table of Contents

Interface IPlayer

Namespace
Obsidian.API
Assembly
Obsidian.API.dll
public interface IPlayer : ILiving, IEntity
Inherited Members

Properties

Abilities

PlayerAbility Abilities { get; }

Property Value

PlayerAbility

AdditionalHearts

float AdditionalHearts { get; set; }

Property Value

float

AttackTime

short AttackTime { get; set; }

Property Value

short

ClientIP

string? ClientIP { get; }

Property Value

string

ClientInformation

ClientInformation ClientInformation { get; }

Property Value

ClientInformation

CurrentSlot

short CurrentSlot { get; }

Property Value

short

DeathTime

short DeathTime { get; set; }

Property Value

short

EnderInventory

Container EnderInventory { get; }

Property Value

Container

FallDistance

float FallDistance { get; set; }

Property Value

float

FoodExhaustionLevel

float FoodExhaustionLevel { get; set; }

Property Value

float

FoodLevel

int FoodLevel { get; set; }

Property Value

int

FoodSaturationLevel

float FoodSaturationLevel { get; set; }

Property Value

float

FoodTickTimer

int FoodTickTimer { get; set; }

Property Value

int

Gamemode

Gamemode Gamemode { get; set; }

Property Value

Gamemode

HeadY

double HeadY { get; }

Property Value

double

HurtTime

short HurtTime { get; set; }

Property Value

short

InHorseInventory

bool InHorseInventory { get; set; }

Property Value

bool

Inventory

Container Inventory { get; }

Property Value

Container

IsOperator

bool IsOperator { get; }

Property Value

bool

LastDeathLocation

Vector? LastDeathLocation { get; set; }

Property Value

Vector?

OpenedContainer

BaseContainer? OpenedContainer { get; set; }

Property Value

BaseContainer

Ping

int Ping { get; }

Property Value

int

SkinProperties

List<SkinProperty> SkinProperties { get; set; }

Property Value

List<SkinProperty>

SleepTimer

short SleepTimer { get; set; }

Property Value

short

Sleeping

bool Sleeping { get; set; }

Property Value

bool

Username

string Username { get; }

Property Value

string

XpLevel

int XpLevel { get; set; }

Property Value

int

XpTotal

int XpTotal { get; set; }

Property Value

int

Methods

DisplayScoreboardAsync(IScoreboard, DisplaySlot)

ValueTask DisplayScoreboardAsync(IScoreboard scoreboard, DisplaySlot position)

Parameters

scoreboard IScoreboard
position DisplaySlot

Returns

ValueTask

GetHeldItem()

ItemStack? GetHeldItem()

Returns

ItemStack

GetOffHandItem()

ItemStack? GetOffHandItem()

Returns

ItemStack

GrantPermissionAsync(string)

Task<bool> GrantPermissionAsync(string permission)

Parameters

permission string

Returns

Task<bool>

HasAllPermissions(IEnumerable<string>)

bool HasAllPermissions(IEnumerable<string> permissions)

Parameters

permissions IEnumerable<string>

Returns

bool

HasAnyPermission(IEnumerable<string>)

bool HasAnyPermission(IEnumerable<string> permissions)

Parameters

permissions IEnumerable<string>

Returns

bool

HasPermission(string)

bool HasPermission(string permission)

Parameters

permission string

Returns

bool

KickAsync(ChatMessage)

ValueTask KickAsync(ChatMessage reason)

Parameters

reason ChatMessage

Returns

ValueTask

KickAsync(string)

ValueTask KickAsync(string reason)

Parameters

reason string

Returns

ValueTask

OpenInventoryAsync(BaseContainer)

ValueTask OpenInventoryAsync(BaseContainer container)

Parameters

container BaseContainer

Returns

ValueTask

RevokePermissionAsync(string)

Task<bool> RevokePermissionAsync(string permission)

Parameters

permission string

Returns

Task<bool>

SendActionBarAsync(string)

Sends an action bar text to the player.

ValueTask SendActionBarAsync(string text)

Parameters

text string

The text of the action bar.

Returns

ValueTask

SendMessageAsync(ChatMessage)

ValueTask SendMessageAsync(ChatMessage message)

Parameters

message ChatMessage

Returns

ValueTask

SendMessageAsync(ChatMessage, Guid, SecureMessageSignature)

ValueTask SendMessageAsync(ChatMessage message, Guid sender, SecureMessageSignature messageSignature)

Parameters

message ChatMessage
sender Guid
messageSignature SecureMessageSignature

Returns

ValueTask

SendSoundAsync(ISoundEffect)

ValueTask SendSoundAsync(ISoundEffect soundEffect)

Parameters

soundEffect ISoundEffect

Returns

ValueTask

SendSubtitleAsync(ChatMessage, int, int, int)

Sends a subtitle message to the player.

ValueTask SendSubtitleAsync(ChatMessage subtitle, int fadeIn, int stay, int fadeOut)

Parameters

subtitle ChatMessage

The title text

fadeIn int

Time in ticks for the title to fade in

stay int

Time in ticks for the title to stay on screen

fadeOut int

Time in ticks for the title to fade out

Returns

ValueTask

SendTitleAsync(ChatMessage, ChatMessage, int, int, int)

Sends a title and subtitle message to the player.

ValueTask SendTitleAsync(ChatMessage title, ChatMessage subtitle, int fadeIn, int stay, int fadeOut)

Parameters

title ChatMessage

The title text

subtitle ChatMessage

The subtitle text

fadeIn int

Time in ticks for the title to fade in

stay int

Time in ticks for the title to stay on screen

fadeOut int

Time in ticks for the title to fade out

Returns

ValueTask

SendTitleAsync(ChatMessage, int, int, int)

Sends a title message to the player.

ValueTask SendTitleAsync(ChatMessage title, int fadeIn, int stay, int fadeOut)

Parameters

title ChatMessage

The title text

fadeIn int

Time in ticks for the title to fade in

stay int

Time in ticks for the title to stay on screen

fadeOut int

Time in ticks for the title to fade out

Returns

ValueTask

SetActionBarTextAsync(ChatMessage)

ValueTask SetActionBarTextAsync(ChatMessage message)

Parameters

message ChatMessage

Returns

ValueTask

SetGamemodeAsync(Gamemode)

ValueTask SetGamemodeAsync(Gamemode gamemode)

Parameters

gamemode Gamemode

Returns

ValueTask

SpawnParticleAsync(ParticleData)

ValueTask SpawnParticleAsync(ParticleData data)

Parameters

data ParticleData

Returns

ValueTask

UpdateDisplayNameAsync(string)

ValueTask UpdateDisplayNameAsync(string newDisplayName)

Parameters

newDisplayName string

Returns

ValueTask