Interface IPlayer
public interface IPlayer : ILiving, IEntity
- Inherited Members
Properties
Abilities
PlayerAbility Abilities { get; }
Property Value
AdditionalHearts
float AdditionalHearts { get; set; }
Property Value
AttackTime
short AttackTime { get; set; }
Property Value
ClientIP
string? ClientIP { get; }
Property Value
ClientInformation
ClientInformation ClientInformation { get; }
Property Value
CurrentSlot
short CurrentSlot { get; }
Property Value
DeathTime
short DeathTime { get; set; }
Property Value
EnderInventory
Container EnderInventory { get; }
Property Value
FallDistance
float FallDistance { get; set; }
Property Value
FoodExhaustionLevel
float FoodExhaustionLevel { get; set; }
Property Value
FoodLevel
int FoodLevel { get; set; }
Property Value
FoodSaturationLevel
float FoodSaturationLevel { get; set; }
Property Value
FoodTickTimer
int FoodTickTimer { get; set; }
Property Value
Gamemode
Gamemode Gamemode { get; set; }
Property Value
HeadY
double HeadY { get; }
Property Value
HurtTime
short HurtTime { get; set; }
Property Value
InHorseInventory
bool InHorseInventory { get; set; }
Property Value
Inventory
Container Inventory { get; }
Property Value
IsOperator
bool IsOperator { get; }
Property Value
LastDeathLocation
Vector? LastDeathLocation { get; set; }
Property Value
OpenedContainer
BaseContainer? OpenedContainer { get; set; }
Property Value
Ping
int Ping { get; }
Property Value
SkinProperties
List<SkinProperty> SkinProperties { get; set; }
Property Value
SleepTimer
short SleepTimer { get; set; }
Property Value
Sleeping
bool Sleeping { get; set; }
Property Value
Username
string Username { get; }
Property Value
XpLevel
int XpLevel { get; set; }
Property Value
XpTotal
int XpTotal { get; set; }
Property Value
Methods
DisplayScoreboardAsync(IScoreboard, DisplaySlot)
ValueTask DisplayScoreboardAsync(IScoreboard scoreboard, DisplaySlot position)
Parameters
scoreboard
IScoreboardposition
DisplaySlot
Returns
GetHeldItem()
ItemStack? GetHeldItem()
Returns
GetOffHandItem()
ItemStack? GetOffHandItem()
Returns
GrantPermissionAsync(string)
Task<bool> GrantPermissionAsync(string permission)
Parameters
permission
string
Returns
HasAllPermissions(IEnumerable<string>)
bool HasAllPermissions(IEnumerable<string> permissions)
Parameters
permissions
IEnumerable<string>
Returns
HasAnyPermission(IEnumerable<string>)
bool HasAnyPermission(IEnumerable<string> permissions)
Parameters
permissions
IEnumerable<string>
Returns
HasPermission(string)
bool HasPermission(string permission)
Parameters
permission
string
Returns
KickAsync(ChatMessage)
ValueTask KickAsync(ChatMessage reason)
Parameters
reason
ChatMessage
Returns
KickAsync(string)
ValueTask KickAsync(string reason)
Parameters
reason
string
Returns
OpenInventoryAsync(BaseContainer)
ValueTask OpenInventoryAsync(BaseContainer container)
Parameters
container
BaseContainer
Returns
RevokePermissionAsync(string)
Task<bool> RevokePermissionAsync(string permission)
Parameters
permission
string
Returns
SendActionBarAsync(string)
Sends an action bar text to the player.
ValueTask SendActionBarAsync(string text)
Parameters
text
stringThe text of the action bar.
Returns
SendMessageAsync(ChatMessage)
ValueTask SendMessageAsync(ChatMessage message)
Parameters
message
ChatMessage
Returns
SendMessageAsync(ChatMessage, Guid, SecureMessageSignature)
ValueTask SendMessageAsync(ChatMessage message, Guid sender, SecureMessageSignature messageSignature)
Parameters
message
ChatMessagesender
GuidmessageSignature
SecureMessageSignature
Returns
SendSoundAsync(ISoundEffect)
ValueTask SendSoundAsync(ISoundEffect soundEffect)
Parameters
soundEffect
ISoundEffect
Returns
SendSubtitleAsync(ChatMessage, int, int, int)
Sends a subtitle message to the player.
ValueTask SendSubtitleAsync(ChatMessage subtitle, int fadeIn, int stay, int fadeOut)
Parameters
subtitle
ChatMessageThe title text
fadeIn
intTime in ticks for the title to fade in
stay
intTime in ticks for the title to stay on screen
fadeOut
intTime in ticks for the title to fade out
Returns
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
ChatMessageThe title text
subtitle
ChatMessageThe subtitle text
fadeIn
intTime in ticks for the title to fade in
stay
intTime in ticks for the title to stay on screen
fadeOut
intTime in ticks for the title to fade out
Returns
SendTitleAsync(ChatMessage, int, int, int)
Sends a title message to the player.
ValueTask SendTitleAsync(ChatMessage title, int fadeIn, int stay, int fadeOut)
Parameters
title
ChatMessageThe title text
fadeIn
intTime in ticks for the title to fade in
stay
intTime in ticks for the title to stay on screen
fadeOut
intTime in ticks for the title to fade out
Returns
SetActionBarTextAsync(ChatMessage)
ValueTask SetActionBarTextAsync(ChatMessage message)
Parameters
message
ChatMessage
Returns
SetGamemodeAsync(Gamemode)
ValueTask SetGamemodeAsync(Gamemode gamemode)
Parameters
gamemode
Gamemode
Returns
SpawnParticleAsync(ParticleData)
ValueTask SpawnParticleAsync(ParticleData data)
Parameters
data
ParticleData
Returns
UpdateDisplayNameAsync(string)
ValueTask UpdateDisplayNameAsync(string newDisplayName)
Parameters
newDisplayName
string