Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultSettings = NewSettings(&packet.ClientSettings{ Locale: "en_US", ViewDistance: 2, ChatVisibility: 0, ChatColors: true, SkinParts: 0, MainHand: 1, TextFilteringEnabled: false, ClientListingAllowed: false, ParticleStatus: int(AllParticleStatus), })
Functions ¶
func AsHoverEntity ¶ added in v0.37.0
func AsHoverEntity(player interface {
ID() uuid.UUID
Username() string
}) *component.ShowEntityHoverType
AsHoverEntity returns a HoverEvent that shows the player as an entity. The result can be passed to component.ShowEntity() to create a hover event for chat messages.
Types ¶
type ChatSession ¶ added in v0.22.0
type ChatSession interface {
SessionID() uuid.UUID // The ID of this chat session.
crypto.KeyIdentifiable
}
ChatSession represents a chat session helf by a player.
type ParticleStatus ¶ added in v0.42.0
type ParticleStatus int
const ( AllParticleStatus ParticleStatus = iota DecreasedParticleStatus MinimalParticleStatus )
type Settings ¶
type Settings interface {
Locale() language.Tag // Locale of the Minecraft client.
// ViewDistance returns the client's view distance. This does not guarantee the client will see this many
// chunks, since your servers are responsible for sending the chunks.
ViewDistance() uint8
ChatMode() ChatMode // The chat setting of the client.
ChatColors() bool // Whether the client has chat colors disabled.
SkinParts() SkinParts // The parts of player skin the client will show.
MainHand() MainHand // The primary hand of the client.
// ClientListing returns whether the client explicitly
// allows listing on the TabList in anonymous tab list mode.
//
// This feature was introduced in 1.18.
ClientListing() bool
TextFiltering() bool // Whether the client has text filtering enabled.
ParticleStatus() ParticleStatus // The particle status of the client.
}
Settings are the client settings the player gave us.
func NewSettings ¶
func NewSettings(packet *packet.ClientSettings) Settings
type SkinParts ¶
type SkinParts byte
func (SkinParts) LeftSleeve ¶
func (SkinParts) RightPants ¶
func (SkinParts) RightSleeve ¶
Click to show internal directories.
Click to hide internal directories.