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
scoreboardIScoreboardpositionDisplaySlot
Returns
GetHeldItem()
ItemStack? GetHeldItem()
Returns
GetOffHandItem()
ItemStack? GetOffHandItem()
Returns
GrantPermissionAsync(string)
Task<bool> GrantPermissionAsync(string permission)
Parameters
permissionstring
Returns
HasAllPermissions(IEnumerable<string>)
bool HasAllPermissions(IEnumerable<string> permissions)
Parameters
permissionsIEnumerable<string>
Returns
HasAnyPermission(IEnumerable<string>)
bool HasAnyPermission(IEnumerable<string> permissions)
Parameters
permissionsIEnumerable<string>
Returns
HasPermission(string)
bool HasPermission(string permission)
Parameters
permissionstring
Returns
KickAsync(ChatMessage)
ValueTask KickAsync(ChatMessage reason)
Parameters
reasonChatMessage
Returns
KickAsync(string)
ValueTask KickAsync(string reason)
Parameters
reasonstring
Returns
OpenInventoryAsync(BaseContainer)
ValueTask OpenInventoryAsync(BaseContainer container)
Parameters
containerBaseContainer
Returns
RevokePermissionAsync(string)
Task<bool> RevokePermissionAsync(string permission)
Parameters
permissionstring
Returns
SendActionBarAsync(string)
Sends an action bar text to the player.
ValueTask SendActionBarAsync(string text)
Parameters
textstringThe text of the action bar.
Returns
SendMessageAsync(ChatMessage)
ValueTask SendMessageAsync(ChatMessage message)
Parameters
messageChatMessage
Returns
SendMessageAsync(ChatMessage, Guid, SecureMessageSignature)
ValueTask SendMessageAsync(ChatMessage message, Guid sender, SecureMessageSignature messageSignature)
Parameters
messageChatMessagesenderGuidmessageSignatureSecureMessageSignature
Returns
SendSoundAsync(ISoundEffect)
ValueTask SendSoundAsync(ISoundEffect soundEffect)
Parameters
soundEffectISoundEffect
Returns
SendSubtitleAsync(ChatMessage, int, int, int)
Sends a subtitle message to the player.
ValueTask SendSubtitleAsync(ChatMessage subtitle, int fadeIn, int stay, int fadeOut)
Parameters
subtitleChatMessageThe title text
fadeInintTime in ticks for the title to fade in
stayintTime in ticks for the title to stay on screen
fadeOutintTime 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
titleChatMessageThe title text
subtitleChatMessageThe subtitle text
fadeInintTime in ticks for the title to fade in
stayintTime in ticks for the title to stay on screen
fadeOutintTime 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
titleChatMessageThe title text
fadeInintTime in ticks for the title to fade in
stayintTime in ticks for the title to stay on screen
fadeOutintTime in ticks for the title to fade out
Returns
SetActionBarTextAsync(ChatMessage)
ValueTask SetActionBarTextAsync(ChatMessage message)
Parameters
messageChatMessage
Returns
SetGamemodeAsync(Gamemode)
ValueTask SetGamemodeAsync(Gamemode gamemode)
Parameters
gamemodeGamemode
Returns
SpawnParticleAsync(ParticleData)
ValueTask SpawnParticleAsync(ParticleData data)
Parameters
dataParticleData
Returns
UpdateDisplayNameAsync(string)
ValueTask UpdateDisplayNameAsync(string newDisplayName)
Parameters
newDisplayNamestring